RegEx-GNU distribution considered harmful

Tor Lillqvist <[email protected]>
Newsgroups gmane.comp.windows.gnu.user
Message-ID <[email protected]>
In my opinion the gnuwin32 distribution of the GNU regexp library
(RegEx-GNU) version 0.12 should be terminated. The binary package
provides a DLL called regex.dll. OK, sounds reasonable so far.

However, that was also the name of the DLL provided by the gnuwin32
build of Henry Spencer's regex library (RegEx-Spencer) until May,
2004. The latest such version is "3.8".

(The current gnuwin32 build of RegEx-Spencer, "3.8.g.3", uses the DLL
name rxspencer.dll. Good.)

These two DLLs with the same name are not at all binary
compatible. (For instance, the size of the regex_t struct is much
larger in the GNU version, and the values of REG_NEWLINE and REG_NOSUB
are different.) But to make the problem harder to notice, the do offer
the same (POSIX specified) entry points.

The current situation can (and did, in at least one documented case,
see http://bugzilla.gnome.org/show_bug.cgi?id=382852) lead to this
scenario:

Somebody, for instance yours truly, is lazy and doesn't check
regularily for new releases of gnuwin32 builds. I build software
against gnuwin32's RegEx-Spencer 3.8, downloaded years ago, and my
binaries thus link to regex.dll. I don't say say clearly enough in
documentation or webpages exactly which dependency this is supposed to
come from.

Now a user downloads my software, notices that it requires something
called "regex.dll", and then guesses (wrongly) that this might be the
gnuwin32 build of GNU regex. The user downloads that, notices that yes
indeed, there is regex.dll, it provides the requires entry points, and
he is satisfied.

But, at runtime the user in the *best case* gets a crash. In the worst
case, silent data corruption.

To avoid this situation I think it would be best to remove the
RegEx-GNU package. Or rebuild it to provide a different name DLL, for
instance rxgnu.dll.

I will in the future build against 3.8.g.3 to avoid the above
scenario.

--tml


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.