ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <>
Subject Re: Jikes dramas
Date Mon, 20 Aug 2001 22:54:00 GMT
Peter Donald wrote:
> On Tue, 21 Aug 2001 07:30, Bojan Smojver wrote:
> > Conor MacNeill wrote:
> > > Can we see the debug line where Jikes is invoked please? It may give a
> > > clue
> > >
> > > Conor
> >
> > Not sure what you mean by 'debug line' here...
> I think he means the command line for jikes as described in ants debug log ...

Aaah, that's in the very first post of this thread.

> > The confusing part here is that when jikes complied for glibc-2.2 is
> > used, standalone compilations are fine. But when called from Ant, it
> > dumps the core. So, there must be something different in the way jikes
> > is called from Ant then from the shell... And yet, the version compiled
> > for glibc-2.1 works fine. This could be one of those infamous
> > RedHat-7.0-we-used-a-bad-compiler-to-create-it things, who knows...
> This is a random guess that may be completely wrong but ...  it is possibly
> that your "java" executable is actually a shell script that sets thing like
> LD_LIBRARY_* (or whatever the environment variables are). These are inherited
> by any sub processes including your executable. This causes problems when
> these variables cause your programs to fail. My only solution is to get a
> statically linked executable, one that works with the JVM or write a wrapper
> script that unsets the environment variables.

This makes sense (ie. I don't think this is such a random guess :-) and
is actually right on the money! I tried this:

- copy the java wrapper script into jikes
- modify the script: instead of calling java, call jikes from the same
- call the jikes script from the command line to compile a single file
- BINGO!!! segfault

Here is the gdb output (just as a curiosity):

(gdb) run
Starting program: /usr/bin/jikes
[New Thread 1024 (LWP 12960)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 12960)]
__strtol_internal (nptr=0x8298508 "\001¬&\b\f\003\002@", endptr=0x0, 
    base=136938760, group=137133952) at eval.c:36
36      eval.c: No such file or directory.
Current language:  auto; currently c
(gdb) where
#0  __strtol_internal (nptr=0x8298508 "\001¬&\b\f\003\002@", endptr=0x0, 
    base=136938760, group=137133952) at eval.c:36
#1  0x40051698 in __user_type_info::dyncast (this=0x8298508, boff=0, 
    target=@0x8298508, objptr=0x82c7f80, subtype=@0x8298300,
   from /usr/lib/
#2  0x40053133 in __dynamic_cast_2 (
    from=0x8237590 <PathSymbol type_info function>, 
    to=0x8237590 <PathSymbol type_info function>, boff=0,
    sub=0x822778c <Symbol type_info function>, subptr=0x82c7f80)
   from /usr/lib/
#3  0x8236e03 in PathSymbol * DYNAMIC_CAST<PathSymbol *, Symbol *> (
    f=0x82c7f80) at ast.h:5209
#4  0x81f60ec in DirectorySymbol::ReadDirectory (this=0x82c7ef8)
    at symbol.h:109
#5  0x8207288 in Control::ProcessPath (this=0x82a8cc8) at system.cpp:448
#6  0x80bd1ad in Control::Control (this=0x82a8cc8, arguments=0x82a88f8, 
    option_=@0x82a8608) at control.cpp:90
#7  0x81d25ff in JikesAPI::compile (this=0x82a85d0, filenames=0x82a88f8)
    at jikesapi.cpp:213
#8  0x81d2149 in main (argc=2, argv=0xbffff684) at jikes.cpp:34
#9  0x400ac2ae in __libc_start_main (main=0x81d210c <main>, argc=2, 
    ubp_av=0xbffff684, init=0x8048eb0 <_init>, fini=0x823fe6c <_fini>, 
    rtld_fini=0x4000cf28 <_dl_fini>, stack_end=0xbffff67c)
---Type <return> to continue, or q <return> to quit---
    at ../sysdeps/generic/libc-start.c:129

Let me see which library is the problematic one...


View raw message