* whatis DYNAMIC_NAME_CLASH_OK
@ 1999-08-26 11:55 jarausch
1999-08-26 12:22 ` Zefram
0 siblings, 1 reply; 3+ messages in thread
From: jarausch @ 1999-08-26 11:55 UTC (permalink / raw)
To: zsh-workers; +Cc: fletch
Hi,
I've just debugged a segment fault, when trying to load
Mike Fletcher's zperl module.
I traced it down to
#0 module_func (m=0x100da3a8, name=0x100ad0f8 "setup_",
name_s=0x100ad100 "setup_%s") at module.c:468
#1 0x1005746c in setup_module (m=0x100da3a8) at module.c:482
Now in 'module_func) (module.c:452)
s= m->nam returning "zperl"
since configure defined DYNAMIC_NAME_CLASH_OK on my IRIX 6.5
it directly calls
fn = (Module_func) dlsym(m->handle, name);
where name = 'setup_'
Obviously that fails (since the correct symbol is setup_zperl)
and the success of dlsym is not checked
we run into nirwana.
1.) What's the heck with DYNAMIC_NAME_CLASH_OK ?
2.) At least IRIX 6.5 obviously needs #undef DYNAMIC_NAME_CLASH_OK
3.) checking the success of dlsym and an error abort
would be nicer than a segment fault, which was hard to be traced
down
Thanks for your comments,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: whatis DYNAMIC_NAME_CLASH_OK
1999-08-26 11:55 whatis DYNAMIC_NAME_CLASH_OK jarausch
@ 1999-08-26 12:22 ` Zefram
1999-08-26 12:26 ` jarausch
0 siblings, 1 reply; 3+ messages in thread
From: Zefram @ 1999-08-26 12:22 UTC (permalink / raw)
To: jarausch; +Cc: zsh-workers, fletch
jarausch@igpm.rwth-aachen.de wrote:
>1.) What's the heck with DYNAMIC_NAME_CLASH_OK ?
That's from a configure test, which checks whether you can load multiple
modules that define symbols with the same name. The reason for it is
that, on systems that permit it, all setup functions are named "setup_"
(and the other module functions similarly), so that a module works
independently of its filename.
-zefram
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: whatis DYNAMIC_NAME_CLASH_OK
1999-08-26 12:22 ` Zefram
@ 1999-08-26 12:26 ` jarausch
0 siblings, 0 replies; 3+ messages in thread
From: jarausch @ 1999-08-26 12:26 UTC (permalink / raw)
To: zefram; +Cc: zsh-workers
On 26 Aug, Zefram wrote:
> jarausch@igpm.rwth-aachen.de wrote:
>>1.) What's the heck with DYNAMIC_NAME_CLASH_OK ?
>
> That's from a configure test, which checks whether you can load multiple
> modules that define symbols with the same name. The reason for it is
> that, on systems that permit it, all setup functions are named "setup_"
> (and the other module functions similarly), so that a module works
> independently of its filename.
>
> -zefram
Thanks,
now I have to find out why dlsym returns an invalid address when
called with 'setup_' only (or should it be 'setup' ?)
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-08-26 12:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-26 11:55 whatis DYNAMIC_NAME_CLASH_OK jarausch
1999-08-26 12:22 ` Zefram
1999-08-26 12:26 ` jarausch
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).