Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking problems in otherlibs/str #2390

Closed
vicuna opened this issue Mar 11, 2000 · 2 comments
Closed

Linking problems in otherlibs/str #2390

vicuna opened this issue Mar 11, 2000 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 11, 2000

Original bug ID: 53
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Gerd Stolpmann
Version: 2.04/Current CVS version
OS: Solaris
Submission from: master.proxy.ision.net (195.180.208.40)

Hi,

I recently detected a problem with otherlibs/str. The GNU regex library defines
the function regfree, which is a POSIX.2 function. Under Solaris, I observed
that the call of regfree in strstubs.c actually invoked the regfree function
defined in libc, and not the regfree function defined in regex. This caused
a core dump every time a regexp value was finalized.

Fortunately, regfree is the only regexp function which conflicts with POSIX
functions; the other calls of regexp functions are not affected.

I have a patch which avoids to call regfree at all (by simply copying the
"free"
invocations into the stub function):
http://people.darmstadt.netsurf.de/Gerd.Stolpmann/ocaml/str-2.04.patch

Gerd

@vicuna
Copy link
Author

vicuna commented Mar 24, 2000

Comment author: administrator

I recently detected a problem with otherlibs/str. The GNU regex library >
defines
the function regfree, which is a POSIX.2 function. Under Solaris, I observed
that the call of regfree in strstubs.c actually invoked the regfree function
defined in libc, and not the regfree function defined in regex. This caused
a core dump every time a regexp value was finalized.

Well spotted. I fixed this by renaming regfree in the GNU regex library,
and #ifdef'ing away all POSIX and BSD emulation code in that library
(we don't need it).

Thanks for the bug report,

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Mar 24, 2000

Comment author: administrator

Fixed on 2000-03-24 by Xavier

@vicuna vicuna closed this as completed Mar 24, 2000
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant