Opened 9 years ago

Closed 9 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:
Has a Patch: yes Platform: All

Description

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

Attachments (1)

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

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by kaliber

Attachment: offsetof.patch added

patch

comment:1 Changed 9 years ago by kaliber

Has a Patch: set

comment:3 Changed 9 years ago by andreasf

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.

comment:4 in reply to:  3 ; Changed 9 years ago by 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.

comment:5 in reply to:  4 Changed 9 years ago by bonefish

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 Changed 9 years ago by kaliber

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 Changed 9 years ago by kaliber

Ping.

comment:8 Changed 9 years ago by bonefish

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