Page MenuHomeFreeBSD

Initialize an argument to NULL instead of expecting dlinfo() to do it.
ClosedPublic

Authored by will on Dec 16 2014, 2:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 21 2024, 2:38 AM
Unknown Object (File)
Dec 20 2023, 1:12 AM
Unknown Object (File)
Nov 26 2023, 10:10 AM
Unknown Object (File)
Oct 3 2023, 7:02 AM
Unknown Object (File)
Aug 25 2023, 11:19 AM
Unknown Object (File)
Aug 22 2023, 4:10 AM
Unknown Object (File)
Jul 12 2023, 8:51 PM
Unknown Object (File)
Jul 5 2023, 1:42 PM
Subscribers
None

Details

Summary

See $SUBJECT. dlinfo() is a weak reference that may not be initialized at
the time of execution. The default implementation (in lib/libc/gen/dlfcn.c)
neither modifies the address pointed to by the third argument nor returns
an error.

Test Plan

I wish I could remember how I hit this issue. This change was made locally
nearly three months ago.

However, in general it's a good idea to initialize variables that may not
be set by a call.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

will retitled this revision from to Initialize an argument to NULL instead of expecting dlinfo() to do it..
will updated this object.
will edited the test plan for this revision. (Show Details)
will added a reviewer: markj.
markj edited edge metadata.

Thanks!

This revision is now accepted and ready to land.Dec 16 2014, 10:14 PM
will updated this revision to Diff 2768.

Closed by commit rS275845 (authored by @will).