Opened 14 years ago

Closed 13 years ago

#6245 closed bug (invalid)

[patch] [clang] kernel crash at hash_insert()

Reported by: kaliber Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: clang Cc: andreasf
Blocked By: Blocking:
Platform: All

Description

Kernel built with clang crashes at hash_insert() in main2 thread.

Attachments (1)

offsetof.patch (555 bytes ) - added by kaliber 14 years ago.
patch

Download all attachments as: .zip

Change History (8)

by kaliber, 14 years ago

Attachment: offsetof.patch added

patch

comment:1 by kaliber, 14 years ago

patch: 01

comment:3 by andreasf, 14 years ago

Cc: andreasf added

Any explanation why it crashes and why this change fixes it?

Patch itself looks okay, but it might be working around a bug in clang.

in reply to:  3 ; comment:4 by kaliber, 14 years ago

Replying to andreasf:

Any explanation why it crashes and why this change fixes it? Patch itself looks okay, but it might be working around a bug in clang.

((addr_t)&vnode->all_next - (addr_t)vnode) was a negative number somehow in this case. I'm not sure how it's possible.

in reply to:  4 comment:5 by bonefish, 14 years ago

Replying to kaliber:

Replying to andreasf:

Any explanation why it crashes and why this change fixes it? Patch itself looks okay, but it might be working around a bug in clang.

((addr_t)&vnode->all_next - (addr_t)vnode) was a negative number somehow in this case. I'm not sure how it's possible.

That's not exactly inspiring trust in the compiler. BTW, the long-term goal is to replace the C hash implementation by OpenHashTable.

comment:6 by kaliber, 14 years ago

I tried to reproduce this bug. I rebuilt haiku with latest clang and looks like the problem has gone. I propose to close this bug and apply this patch just in case.

comment:7 by kaliber, 13 years ago

Ping.

comment:8 by bonefish, 13 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.