Mozilla fails to run due to missing StubNNN global data

RESOLVED FIXED

Status

()

Core
XPCOM
--
critical
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: Jim Brown, Assigned: dougt)

Tracking

Trunk
DEC
OSF/1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (X11; U; OSF1 alpha; en-US; rv:1.2) Gecko/20021205
Build Identifier: mozilla-source-1.4a.tar.gz

/reflect/xptcall/src/md/unix/xptcstubs_asm_osf1_alpha.s does not correctly
generate the STUB_ENTRY declarations because the C preprocessor does not
understand the '##' construct (since -std1 was removed in another bug fix).


Reproducible: Always

Steps to Reproduce:
1. build mozilla
2. try to run, it fails due to undefined Stub data.
3.
(Reporter)

Comment 1

15 years ago
Created attachment 120074 [details] [diff] [review]
Patch v1.0, simple fix
(Reporter)

Comment 2

15 years ago
Created attachment 120076 [details] [diff] [review]
Patch v1.1, works both ways
(Reporter)

Updated

15 years ago
Attachment #120074 - Attachment is obsolete: true
Attachment #120076 - Flags: review?(dbradley)
(Reporter)

Comment 3

15 years ago
This problem was seen on Tru64 V5.1B using system compiler (cc) and Compaq
c++ v6.5 (CC=cc, CXX=cxx, CFLAGS=-pthread).

Comment 4

15 years ago
Comment on attachment 120076 [details] [diff] [review]
Patch v1.1, works both ways

r=dbradley

Did you intended inject that last semicolon? The original code doesn't have it.

I'll have to take your word that the /**/ mechanism works.
Attachment #120076 - Flags: review?(dbradley) → review+
(Reporter)

Comment 5

15 years ago
Created attachment 120204 [details] [diff] [review]
v1.1.1, without extra semi-colon

It got in while I was testing different ways to solve the problem.
Attachment #120076 - Attachment is obsolete: true
(Reporter)

Comment 6

15 years ago
Created attachment 120228 [details] [diff] [review]
v1.1.2, restore missing blank lines terminating STUB macros

Compiles cleanly with and without -std1.
Should have done more testing before posting merged patches.
Attachment #120204 - Attachment is obsolete: true
(Reporter)

Comment 7

15 years ago
I am satisfied with patch v1.1.2.
It compiles cleanly with/without -std1.
mozilla now runs for me on Tru64 v5.1b.

Comment 8

15 years ago
Comment on attachment 120228 [details] [diff] [review]
v1.1.2, restore missing blank lines terminating STUB macros

r=dbradley
Attachment #120228 - Flags: review+

Comment 9

15 years ago
NEW
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 10

15 years ago
Checking in xptcstubs_asm_osf1_alpha.s;
/cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_osf1_alpha.s,v
 <--  xptcstubs_asm_osf1_alpha.s
new revision: 1.2; previous revision: 1.1
done


Fixed.

Thanks for the fix.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED

Comment 11

15 years ago
Comment on attachment 120228 [details] [diff] [review]
v1.1.2, restore missing blank lines terminating STUB macros

Jim,

I don't understand why you said the C preprocessor doesn't handle
## if run with -std.

Here is an experiment that shows the opposite.

diffie:/u/wtc/tmp 47% cat foo.c
#define FOO(n)	before##n##after

int FOO(1);
long FOO(2);
diffie:/u/wtc/tmp 48% cc -V
Compaq C V6.4-214 (dtk) on Compaq Tru64 UNIX V5.0A (Rev. 1094)
Compiler Driver V6.4-014 (dtk) cc Driver
diffie:/u/wtc/tmp 49% cat foo.c
#define FOO(n)	before##n##after

int FOO(1);
long FOO(2);
diffie:/u/wtc/tmp 50% cc -std -E foo.c
# 1 "foo.c"


int  before1after ;
long  before2after ;
(Reporter)

Comment 12

15 years ago
I should have been more specific -- the C preprocessor used by the 
assembler has this problem.  Here is an example which clearly shows 
the problem.

% cat f0.s
#define FOO(n)  .globl before##n##after;\
        .ent before##n##after;\
before##n##after:;\
        nop;\
        .end before##n##after

FOO(1);
FOO(2);

% cc -c f0.s
% nm f0.o
"
Name                                    Value        Type       Size

"before                           | 0000000000000000 | N | 0000000000000000
% cc -c -std1 f0.s
% nm f0.o
"
Name                                    Value        Type       Size

"_fpdata                          | 0000000000000000 | U | 0000000000000000
before1after                     | 0000000000000000 | T | 0000000000000008
before2after                     | 0000000000000004 | T | 0000000000000008

Add the extra checks and it can be made to work (generate code) either 
way.

% cat f1.s
#if __STDC__
#define FOO(n)  .globl before##n##after;\
        .ent before##n##after;\
before##n##after:;\
        nop;\
        .end before##n##after
#else
#define FOO(n)  .globl before/**/n/**/after;\
        .ent before/**/n/**/after;\
before/**/n/**/after:;\
        nop;\
        .end before/**/n/**/after
#endif

FOO(1);
FOO(2);

% cc -c f1.s
% nm f1.o
"
Name                                    Value        Type       Size

"_fpdata                          | 0000000000000000 | U | 0000000000000000
before1after                     | 0000000000000000 | T | 0000000000000008
before2after                     | 0000000000000004 | T | 0000000000000008
% cc -c -std1 f1.s
% nm f1.o
"
Name                                    Value        Type       Size

"_fpdata                          | 0000000000000000 | U | 0000000000000000
before1after                     | 0000000000000000 | T | 0000000000000008
before2after                     | 0000000000000004 | T | 0000000000000008
You need to log in before you can comment on or make changes to this bug.