Last Comment Bug 203317 - getipnodebyxxxx routines not threadsafe on OpenVMS
: getipnodebyxxxx routines not threadsafe on OpenVMS
Product: NSPR
Classification: Components
Component: NSPR (show other bugs)
: other
: -- normal (vote)
: 4.4
Assigned To: Wan-Teh Chang
: Wan-Teh Chang
Depends on:
  Show dependency treegraph
Reported: 2003-04-25 05:16 PDT by Colin Blake
Modified: 2003-05-19 11:41 PDT (History)
0 users
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Current patch (1.79 KB, patch)
2003-04-25 05:20 PDT, Colin Blake
no flags Details | Diff | Splinter Review
Proposed patch (2.41 KB, patch)
2003-04-29 07:25 PDT, Colin Blake
no flags Details | Diff | Splinter Review
Proposed patch v1.1 (2.35 KB, patch)
2003-04-29 11:52 PDT, Wan-Teh Chang
colin: review+
dbaron: approval1.4b+
Details | Diff | Splinter Review

Description Colin Blake 2003-04-25 05:16:06 PDT
It turns out that the getipnodebyxxxx routines provided by TCP/IP Services for
OpenVMS are not threadsafe (I have reported this internally as PTR 30-5-415 in
library OSSG). But until the problem gets fixed, I have to patch prnetdb.c to
work around the bug (see attachment in next reply).

If I were to change the "#ifdef VMS" to "#ifdef PR_GETIPNODE_NOT_THREADSAFE" or
something like that, and then define PR_GETIPNODE_NOT_THREADSAFE in
nsprpub/config/, is this something that could/should be checked in?
Comment 1 Colin Blake 2003-04-25 05:20:30 PDT
Created attachment 121649 [details] [diff] [review]
Current patch

This is my current workaround.
Comment 2 Wan-Teh Chang 2003-04-25 08:07:17 PDT
Yes, please use something like PR_GETIPNODE_NOT_THREADSAFE.
You'd need to define that macro in nsprpub/
nsprpub/config/ is obsolete.
Comment 3 Colin Blake 2003-04-29 07:25:29 PDT
Created attachment 122013 [details] [diff] [review]
Proposed patch

This version of the patch uses PR_GETIPNODE_NOT_THREADSAFE, and defines it in
the OpenVMS section of
Comment 4 Wan-Teh Chang 2003-04-29 11:52:51 PDT
Created attachment 122027 [details] [diff] [review]
Proposed patch v1.1

This is essentially the same as Colin's patch.	I only made
some changes to conform to the coding style (of the placement
of curly braces) and to avoid this nested ifdef and if, which
I find difficult to understand:

     if (_pr_ipv6_is_present == PR_FALSE)
Comment 5 Colin Blake 2003-04-29 16:51:44 PDT
Comment on attachment 122027 [details] [diff] [review]
Proposed patch v1.1

Can this get into 1.4b?
Comment 6 Colin Blake 2003-05-19 08:46:19 PDT
I believe this fix is checked in now. So the bug can be closed?
Comment 7 Wan-Teh Chang 2003-05-19 11:41:39 PDT
Yes, the fix has been checked in.  Marked the bug fixed.

Note You need to log in before you can comment on or make changes to this bug.