General
cancel
Showing results for 
Search instead for 
Did you mean: 

Error strlen+0x41 () from /usr/lib/hpux32/libc.so.1

Must123
Occasional Advisor

Error strlen+0x41 () from /usr/lib/hpux32/libc.so.1

Hi,
I am starting a tuxedo server on HP Itanium machine. This server starts perfectly on HP UX PA RISC system. However on itanium its coring.

here is the gdb trace,

==========================================
#0 0x60000000c01f4ea0:1 in strlen+0x41 () from /usr/lib/hpux32/libc.so.1
#1 0x4051850:2 in inline string_char_traits::length(char const*) (
s=0x80000000
)
at /opt/aCC/include/string:252
#2 0x4051820:0 in basic_string,allocator>::basic_string (this=0x7fffa960, s=0x80000000
,
alloc=@0x7fffa931) at /opt/aCC/include/string.cc:166
#3 0x4103790:2 in inline allocator::allocator() ()
#4 0x4103770:0 in RoutingServer::registerMapFiles (this=0x40029f80,
file=0x4006bdb4 "../data/adr_npanxx_area_host-prod.dat")
at RoutingServer.cpp:100
#5 0x404c330:0 in ADDR_router::initialize (this=0x40029f80)
at ADDR_router.cpp:193
#6 0x41092a0:0 in tpsvrinit (argc=18, argv=0x7fffd7d0)
at RoutingTuxFront.cpp:39
#7 0x60000000ccd2ce40:0 in _tmmain () at stdmain.c:262
#8 0x60000000ccd01cd0:0 in _tmstartserver () at tmstrtsrvr.c:129
#9 0x4048ef0:0 in main+0x50 ()


(gdb) frame 4
#4 0x4103770:0 in RoutingServer::registerMapFiles (this=0x40029f80,
file=0x4006bdb4 "../data/adr_npanxx_area_host-prod.dat")
at RoutingServer.cpp:100
100 _mapFileList.push_back(string(mapFile));

(gdb) whatis _mapFileList
type = class list

(gdb) list
95 //
96 _mapFileList.push_back(string(file));
97 va_list vargs;
98 va_start(vargs, file);
99 while (mapFile = va_arg(vargs, const char*))
100 _mapFileList.push_back(string(mapFile));
101 va_end(vargs);
102 };

==========================================

Thanks in advance.

Regards,
Mustapha Shaikh
4 REPLIES
Laurent Menase
Honored Contributor

Re: Error strlen+0x41 () from /usr/lib/hpux32/libc.so.1

I think it would be appropriate to ask it to Tuxedo support.
Dennis Handly
Acclaimed Contributor

Re: Error strlen+0x41 () from /usr/lib/hpux32/libc.so.1

You have a bogus address: 0x80000000

99 while (mapFile = va_arg(vargs, const char*))
100 _mapFileList.push_back(string(mapFile));

Have you passed an explicit NULL to registerMapFiles to terminate your variable argument list?
Must123
Occasional Advisor

Re: Error strlen+0x41 () from /usr/lib/hpux32/libc.so.1

For registerMapFiles we are passing the following parameters,


registerMapFiles(f1.c_str(),
f2.c_str(),f3.c_str(),f4.c_str(),f5.c_str(),f6.c_str(),f7.c_str(),f8.c_str(),f9.c_str(),f10.c_str(),f11.c_str(),f12.c_str(),f13.c_str(),f14.c_str());

After puttng some couts I got the following trace in registerMapFiles(),
============
cout<< string(file)<< endl;
int i=0;
while (mapFile = va_arg(vargs, const char*))
{
cout << i++ << ":"<============

../data/1.dat
0:../data/2.dat
1:../data/3.dat
2:../data/4.dat
3:../data/5.dat
4:../data/6.dat
5:../data/7.dat
6:../data/8.dat
7:../data/9.dat
8:../data/10.dat
9:../data/11.dat
10:../data/12.dat
11:../data/13.dat
12:../data/14.dat
13:
14:`
15:

It looks like 13,14 and 15th parameters are having some junk characters. However the intersting thing is that we are not passing it to the function, still how its getting passed is a mystery.

Many Thanks in advance.
Dennis Handly
Acclaimed Contributor

Re: Error strlen+0x41 () from /usr/lib/hpux32/libc.so.1

>For registerMapFiles we are passing the following parameters,

As I guessed, you are NOT passing in NULL. You must have that at the end.

>the interesting thing is that we are not passing it to the function

va_arg doesn't know how many args you are passing. You have it going until it sees a NULL.