lamuguo / re2

Automatically exported from code.google.com/p/re2
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Options::set_max_mem() takes an int #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
-- What steps will reproduce the problem?

1. Compile with g++ on amd64
2. Call Options::set_max_mem() with a value > (2^31 - 1)
3. Call Options::max_mem()

-- What is the expected output? What do you see instead?

Internally, max_mem_ is an int64_t. It would be useful to me if the interface 
also presented/accepted an int64_t.

After the obvious trivial patch and the selection of a suitably large value for 
max_mem, re2 is able to successfully compile a regex containing a single 
alternation over all the c. 500,000 strings in /usr/share/dict/words.

What version of the product are you using? On what operating system?

Checked out latest version, Fedora 18.

Original issue reported on code.google.com by bschofi...@gmail.com on 6 Mar 2013 at 8:36

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 7f1c5387aac5.

Original comment by rsc@swtch.com on 10 Jan 2014 at 3:17