LDAP auth dialog box has bizarre text (egcs 1.1.2 codegen bug)

VERIFIED FIXED in mozilla1.0.1


MailNews Core
LDAP Integration
16 years ago
10 years ago


(Reporter: dmose, Assigned: dmose)


(Blocks: 1 bug)

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [ADT2 RTM] [ETA 06/21])


(1 attachment)

1.36 KB, patch
Brian Ryner (not reading)
: review+
: superreview+
Judson Valeski
: approval+
Details | Diff | Splinter Review


16 years ago
Configure an LDAP server to have a Bind DN currently only the 5/3/2002 and newer
trunk builds have this option).  In a nightly build, one sees:

"Please enter your password for authPromptText."

In a debug build, one sees the expected thing, where authPromptText is instead
the hostname of the LDAP server.

I'm fairly sure (though not yet 100%) this is not a packaging problem, because
if there were packing problems here, other strings would be busted too, I think.


16 years ago
Blocks: 148891
Keywords: nsbeta1
Priority: -- → P3
Target Milestone: --- → mozilla1.0.1

Comment 1

16 years ago
Discussed in mail news bug meeting.  Decided to plus this bug.
Keywords: nsbeta1 → nsbeta1+
Whiteboard: [ADT2 RTM]


16 years ago
Priority: P3 → P2

Comment 2

16 years ago
OK, problem still exists in a debug tree built with egcs 1.1.2, so this is
neither a packaging nor an optimizer problem.  Looks like codegen.  Time to bust
out the debugger and disassemble...
Summary: LDAP auth dialog box has bizarre text (apparent egcs 1.1.2 optimizer bug) → LDAP auth dialog box has bizarre text (apparent egcs 1.1.2 codegen bug)

Comment 3

16 years ago
Created attachment 88385 [details] [diff] [review]
patch, v1

Fix incorrect array length calculation & add temporary variable to work around
egcs bug.


16 years ago
Summary: LDAP auth dialog box has bizarre text (apparent egcs 1.1.2 codegen bug) → LDAP auth dialog box has bizarre text (egcs 1.1.2 codegen bug)
Comment on attachment 88385 [details] [diff] [review]
patch, v1

Attachment #88385 - Flags: review+

Comment 5

16 years ago
Comment on attachment 88385 [details] [diff] [review]
patch, v1

Attachment #88385 - Flags: superreview+

Comment 6

16 years ago
This exact same patch (literally, the same patch file) also must be applied to
xpfe/components/autocomplete/src/nsLDAPAutoCompleteSession.cpp.  |patch -l|
should be used.

Comment 7

16 years ago
Fix checked into both of these files on the trunk.  Still needs to land on the
Last Resolved: 16 years ago
Keywords: adt1.0.1, mozilla1.0.1
Resolution: --- → FIXED

Comment 8

16 years ago
Are you sure egcs is the problem here?

-        const PRUnichar *hostArray[1] = { NS_ConvertASCIItoUCS2(host).get() };

That line of code is so bogus. The temporary object there and therefore its
internal buffer may have gone away on the line following it, leaving a dangling
pointer in hostArray. The solution you've used is the correct one. That it
happened to work with other compilers is pure luck.


16 years ago
Attachment #88385 - Flags: approval+

Comment 9

16 years ago
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1+"
keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.1 → mozilla1.0.1+

Comment 10

16 years ago
jag: the braces used to delimit an array-initializer also count as block scope?
 I didn't think that was the case, and I don't have my copy of Stroustrup handy
to check.  Ah well, either way the bug is fixed.

Comment 11

16 years ago
dding adt1.0.1+ on behalf of the adt for checkin to the 1.0 branch.  Please get
drivers approval before checking in. When you check this into the branch, please
change the mozilla1.0.1+ keyword to fixed1.0.1

Keywords: adt1.0.1 → adt1.0.1+

Comment 12

16 years ago
It's nothing to do with block scopes. Take for example

  const char* foopy = nsCString("foopy").get();

  printf("%s\n", foopy); // foopy at this point may be a dangling pointer.

See http://lxr.mozilla.org/seamonkey/source/string/doc/string-guide.html


16 years ago
Blocks: 143047
Whiteboard: [ADT2 RTM] → [ADT2 RTM] [ETA 06/21]

Comment 13

16 years ago
jag: Oh, right!  I see now; thanks.  I'll open another bug to fix the bogus
commentary that I've just added.  :-)

Committed to the branch.
Keywords: mozilla1.0.1+ → fixed1.0.1

Comment 14

16 years ago
Verified with 20020626 branch build on LINUX platform.
Keywords: fixed1.0.1 → verified1.0.1
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.