This is an archive of the discontinued LLVM Phabricator instance.

Use SI_KERNEL on platforms defining it
ClosedPublic

Authored by krytarowski on Sep 4 2015, 7:36 PM.

Details

Summary

Linux and FreeBSD occasionally send SI_KERNEL codes, nonexistent on other platforms.

Problem caught on NetBSD.

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski updated this revision to Diff 34099.Sep 4 2015, 7:36 PM
krytarowski retitled this revision from to Use SI_KERNEL on platforms defining it.
krytarowski updated this object.
krytarowski added a reviewer: joerg.
krytarowski set the repository for this revision to rL LLVM.
krytarowski added a subscriber: lldb-commits.
krytarowski updated this object.Sep 4 2015, 8:04 PM
sas accepted this revision.Sep 10 2015, 10:04 AM
sas added a reviewer: sas.
sas added a subscriber: sas.

Makes sense. Adding a tiny comment explaining which platforms get SI_KERNEL might be a good idea here.

This revision is now accepted and ready to land.Sep 10 2015, 10:04 AM
In D12659#243415, @sas wrote:

Makes sense. Adding a tiny comment explaining which platforms get SI_KERNEL might be a good idea here.

Can I replace the following comment:

// Linux will occasionally send spurious SI_KERNEL codes.
// (this is poorly documented in sigaction)
// One way to get this is via unaligned SIMD loads.

To something more generic:

// Some platforms will occasionally send nonstandard spurious SI_KERNEL codes.
// One way to get this is via unaligned SIMD loads.

This is not exactly what you asked for but makes it more generic and thus not desynchronized with the reality when the time will pass.

In D12659#243415, @sas wrote:

To something more generic:

// Some platforms will occasionally send nonstandard spurious SI_KERNEL codes.
// One way to get this is via unaligned SIMD loads.

This is not exactly what you asked for but makes it more generic and thus not desynchronized with the reality when the time will pass.

I agree - there's no point in trying to manually keep a list in the comment up to date.

krytarowski edited edge metadata.

Rework the comment regarding SI_KERNEL.

Please commit it if it's OK.

sas closed this revision.Sep 14 2015, 9:54 AM

Committed as r247579.