Page MenuHomeFreeBSD

kdb_sysctl_trap: suppress gcc -Warray-bounds
ClosedPublic

Authored by rlibby on Jul 8 2024, 3:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 5, 10:48 PM
Unknown Object (File)
Mon, Oct 5, 8:56 AM
Unknown Object (File)
Mon, Oct 5, 8:40 AM
Unknown Object (File)
Sun, Oct 4, 1:43 PM
Unknown Object (File)
Sat, Oct 3, 9:01 PM
Unknown Object (File)
Sat, Oct 3, 8:59 PM
Unknown Object (File)
Sat, Oct 3, 10:48 AM
Unknown Object (File)
Fri, Sep 18, 4:14 AM
Subscribers

Details

Summary

gcc diagnosed a dereference of 0x10 with -Warray-bounds, which is
entirely sensible, except that this is a deliberate trap. Throw gcc off
with a volatile pointer.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58566
Build 55454: arc lint + arc unit

Event Timeline

rlibby requested review of this revision.Jul 8 2024, 3:58 PM
kib added inline comments.
sys/kern/subr_kdb.c
241

I believe this is more style-ish

This revision is now accepted and ready to land.Jul 8 2024, 6:47 PM
sys/kern/subr_kdb.c
241

We seem to have a mix of both for both *volatile and *const. I'll take your suggestion.

This revision now requires review to proceed.Jul 8 2024, 8:34 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 9 2024, 6:46 PM
This revision was automatically updated to reflect the committed changes.