From: Ben Crowell Date: 2007-06-12T10:10:07+09:00 Subject: Re: possible bug in oniguruma, not 64-bit clean? Daniel Berger wrote: > On Jun 11, 3:43 pm, Ben Crowell > wrote: >> Okay, I managed to make something a little smaller: >> http://www.lightandmatter.com/ruby_bug.tar.gz >> When I run the script "bug" in this tarball on my >> x64 machine, I get the following output: >> >> -------------------------------------------------------- >> warning, undefined reference nonmetricunits >> warning, undefined reference electroncapture >> ./a.rb:570:in `block in handle_math': unmatched close parenthesis: >> /\220\007~\000\000\000\000\000in|end){align\*?}/ (RegexpError) > ^ > > Where's the matching opening paren for "end)" there? It's not there, because the ruby interpreter has changed my source code! If you look back at my original post, I gave the source code that I actually wrote: tex.split(/\\(?:begin|end){#{x}}/).each { |m| The opening paren is there in my source code. When the error message is printed out, it's apparent that the first 8 bytes of the regex string have been overwritten with garbage by a bug in the ruby interpreter.