[LLVMbugs] [Bug 5128] New: miscompiles led.c:led_create_state from the FreeBSD kernel
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Oct 3 04:50:38 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=5128
Summary: miscompiles led.c:led_create_state from the FreeBSD
kernel
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: pawel.worach at gmail.com
CC: llvmbugs at cs.uiuc.edu, rdivacky at freebsd.org
Blocks: 3696
Created an attachment (id=3605)
--> (http://llvm.org/bugs/attachment.cgi?id=3605)
led.i
This is a somewhat vague report just to get this bug going, Roman will fill in
the details.
In the led_create_state() function in led.c the call sc->func() fails, it end
up with a page fault panic where it looks like func points to led_list which is
accessed in the LIST_HEAD_INSERT macro.
Now I the code is changed to insert a printf between there like this it works:
LIST_INSERT_HEAD(&led_list, sc, list);
printf("hello\n");
sc->func(sc->private, state != 0);
Attached you can find the preprocessed led.c, the original asm output as
led-broken.s and the "fixed" asm output where the printf was inserted.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list