Project

General

Profile

Actions

Bug #288

open

Type mismatch spots found by undefined behavior sanitizer

Added by Shawn C almost 4 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
01/05/2021
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:

Description

Spot 1:

type mismatch src/lib/asan.c:90:9

ubsan: unrecoverable error

The snippet code is in func static __always_inline bool memory_is_poisoned_16():

return *shadow_addr;

Even if you change the code to something like "return *shadow_addr ? 1 : 0;", ubsan will produce the same error. Is this a bug in coreboot or a bug in ubsan? The similar code won't have any problem tested by GCC-7.3/8.3/9.3. So the current implementation of ubsan may have some differences between coreboot and other userspace apps built by GCC.

Spot 2:

type mismatch src/cpu/x86/lapic/lapic_cpu_init.c:51:13

ubsan: unrecoverable error.

No data to display

Actions

Also available in: Atom PDF