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

Throws bad_alloc #21

Closed
TinoDidriksen opened this issue Jun 5, 2019 · 4 comments
Closed

Throws bad_alloc #21

TinoDidriksen opened this issue Jun 5, 2019 · 4 comments

Comments

@TinoDidriksen
Copy link
Member

TinoDidriksen commented Jun 5, 2019

With 4165215,
curl -Ss https://termbin.com/4q1i |lrx-comp - /tmp/fra.bin runs and yields 991 bytes. On 32 bit it yields 975 bytes.
curl -Ss https://termbin.com/cwbf |lrx-proc -m -t /tmp/fra.bin dies with bad_alloc on both 32 and 64 bit.

Which exact commit caused it I haven't tested yet.

@TinoDidriksen TinoDidriksen changed the title 32 bit throws bad_alloc Throws bad_alloc Jun 5, 2019
@TinoDidriksen
Copy link
Member Author

First test says https://github.com/apertium/apertium-lex-tools/blob/master/lrx_processor.cc#L835 grows infinitely. Could be any of the appends to that string, not necessarily that exact line.

@TinoDidriksen
Copy link
Member Author

This happens all the way back to 4fe00c6 from 2018-08-06 - can't easily test before that because lttoolbox was also changed.

@TinoDidriksen
Copy link
Member Author

In the old versions the same append is reported (

trad += static_cast<wchar_t>(val);
), so there's something to look at.

@unhammer
Copy link
Member

unhammer commented Jun 6, 2019

Does that while loop need to check for WEOF?

TinoDidriksen added a commit that referenced this issue Sep 16, 2019
…ng, but WEOF doesn't work here due to sign difference (fixes #21)
vivekvardhanadepu pushed a commit to vivekvardhanadepu/apertium-lex-tools that referenced this issue Jul 11, 2021
…ng, but WEOF doesn't work here due to sign difference (fixes apertium#21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants