Open Bug 838566 Opened 12 years ago Updated 2 years ago

The libVersionPoint functions are either useless and harmful

Categories

(NSPR :: NSPR, defect)

defect

Tracking

(Not tracked)

People

(Reporter: glandium, Unassigned)

References

Details

Each of plds, plc and nspr have a libVersionPoint function. Without symbol version or namespaced binding, like on linux, this means any third party using that function may be calling the function in a library different from the one intended. They also conflict when folding all libraries in one. The functions should either have a different name in each library, or be removed.
Mike: I looked at the comments in http://mxr.mozilla.org/nspr/source/pr/include/prvrsion.h. The libVersionPoint function is intended to be looked up by name with dlopen + dlsym, so it needs to have the same name for all libraries that implement this spec. When you fold all the NSPR libraries in one, the combined library doesn't need to implement this spec. So it is best to just exclude prvrsion.c and the two plvrsion.c files. If the libVersionPoint functions are causing serious problems, we can schedule a date to have them removed and announce the date in advance to NSPR users. I doubt anyone is using them.
Mike: I just studied the comments in http://mxr.mozilla.org/nspr/source/pr/include/prvrsion.h. to refresh my memory. The libVersionPoint function is intended to be looked up by name with dlopen + dlsym, so it needs to have the same name for all libraries that implement this spec. When you fold all the NSPR libraries in one, the combined library doesn't need to implement this spec. So it is best to just exclude prvrsion.c and the two plvrsion.c files. If the libVersionPoint functions are causing serious problems, we can schedule a date to have them removed from the NSPR libraries, and announce the date in advance to NSPR users. I doubt anyone is using them.
Sorry about the double posting. Comment 1 and comment 2 contain the same contents. Comment 2 is more polished. Please ignore comment 1.
Besides the problem for which i filed this bug, it also causes all builds to have a different timestamp hardcoded in them, see bug 981558.

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: wtc → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.