Closed Bug 219104 Opened 18 years ago Closed 18 years ago

Mac builds not loading URLs because is 4098 instead of 2


(NSPR :: NSPR, defect)

Not set


(Not tracked)



(Reporter: dbaron, Assigned: darin.moz)



(Keywords: regression)


(1 file)

The mac builds on our two trunk tinderboxes (including the current nightly)
don't load URLs.

This is because on Linux, struct sockaddr looks like this:

    unsigned short int sa_family;
    unsigned char sa_data[14];

but on Mac it looks like this:

        u_char  sa_len;                 /* total length */
        u_char  sa_family;              /* address family */
        char            sa_data[14];            /* actually longer; address value */

So you can't memcpy a sockaddr struct into a PRNetAddr as PR_EnumerateAddrInfo does.

bryner deserves most of the credit for figuring this out.

In any case, I'll attach the patch I put on the tinderboxes so that they run
again.  It may not be the right thing, but it seems to work.
Attached patch patchSplinter Review
Patch I put on the two Mac tinderboxes that makes the world work again.
crap!  thanks for working up a fix for this.  sounds like we should replace this
code block with field-by-field assignment in case there happen to be other
instances where this memcpy causes problems.
Comment on attachment 131387 [details] [diff] [review]


This patch ensures that the sa_len field, which exists in
the sockaddr structure on some platforms (usually derivatives
of BSD4.4), is not copied to PRNetAddr.

I've checked in this patch on the NSPRPUB_PRE_4_2_CLIENT_BRANCH
(Mozilla 1.6 alpha) and NSPR trunk (NSPR 4.5).
Attachment #131387 - Flags: review+
from bug 219088 comment 4

This patch seems to me working on FreeBSD, and a reporter says that it
works on Mac OS X too.
Please check in on 1.5 final.
Otherwise Mac and FreeBSD (and *BSD?) users will go away.
This is a Blocker and regression for us.
-> Blocker/regression/1.5?
Severity: normal → blocker
Flags: blocking1.5?
Keywords: regression
Mozilla 1.5 does not have the new code that has this bug.
The new code was only checked into Mozilla 1.6 (alpha)
development trunk.
Flags: blocking1.5?
*** Bug 219126 has been marked as a duplicate of this bug. ***
*** Bug 219166 has been marked as a duplicate of this bug. ***
On MacOSX, 2003091705-trnuk build still have this problem.  When I tested new
profile, I can't access to start page(
BTW, does this bug relate to bug 219150?  See Mozillazine forum(Firebird Bugs).
This bug has been fixed., could you file a new bug
about your problem?
Closed: 18 years ago
Resolution: --- → FIXED
Sorry for the spam; I have added my comment to bug 219512.

Web pages loads hang for several minutes before finishing.

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