Page MenuHomeFreeBSD

Unlike Solaris, in FreeBSD p_args can be NULL so check for that before checking ar_args.
ClosedPublic

Authored by gnn on Aug 25 2016, 10:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 8, 5:04 PM
Unknown Object (File)
Jan 1 2024, 3:55 AM
Unknown Object (File)
Dec 25 2023, 7:50 PM
Unknown Object (File)
Nov 3 2023, 4:29 AM
Unknown Object (File)
Sep 5 2023, 10:59 PM
Unknown Object (File)
Jul 22 2023, 9:28 PM
Unknown Object (File)
Jun 16 2023, 4:32 PM
Unknown Object (File)
May 15 2023, 3:04 PM
Subscribers

Details

Reviewers
markj
jhb
Group Reviewers
DTrace

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4939
Build 5002: arc lint + arc unit

Event Timeline

gnn retitled this revision from to Unlike Solaris, in FreeBSD p_args can be NULL so check for that before checking ar_args..
gnn updated this object.
gnn edited the test plan for this revision. (Show Details)
markj edited edge metadata.
markj added inline comments.
cddl/lib/libdtrace/psinfo.d
63

You could squash this a bit: (T->p_args == 0 || T->p_args->ar_args == 0) ? "" : ...

The indentation looks a bit off too, but that might be phabricator.

This revision is now accepted and ready to land.Aug 25 2016, 11:01 PM
gnn edited edge metadata.

Tighten up the logic.

This revision now requires review to proceed.Aug 25 2016, 11:06 PM

I'm believe ar_args can't be NULL if p_args is non-NULL FWIW. Other places assume that ar_args is valid if p_args is not NULL. Given that, I think you can remove the ar_args check. Actually, ar_args isn't a pointer, it's a variable length array at the end of the structure, so there's never a pointer to check. You should remove the 'ar_args == 0' test.

gnn edited edge metadata.

jhb@ reports that if p_args is non 0 then ar_args will be valid.

markj edited edge metadata.
This revision is now accepted and ready to land.Aug 25 2016, 11:10 PM
jhb added a reviewer: jhb.

Committed revision 304825.