-
Notifications
You must be signed in to change notification settings - Fork 501
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
long transaction causes assertion failure with register format #2174
Comments
I guess the issue is just this: Line 72 in ccbd933
I don't see any reason why the length has to be less than 1024, and if I just remove that it seems to work. |
Is there any possibility this oneline patch could could get applied? |
The question is whether there is any buffer that is 1024? If it works when you remove it, maybe the buffer size was updated (I know we updated some buffer sizes) in which case this But I'm just guessing blindly here... |
I guess, but it definitely isn't the correct assertion today and it's effectively causing a crash for me! If this is going to be a hardlimit, I don't mind - I guess I just need to rewrite some long transactions so they continue working in new versions (I just patch my build to remove this at the moment, but would prefer to get automatic distro updates). |
@jwiegley since you're active, can you check which buffer this relates to and what the current acceptable size is. |
This seems very arbitrary to me, and should be at least as large as the longest line allowed by Ledger. |
I've submitted a PR that synchronizes this number with |
Just to refer to the commit: commit d77e083
|
FWIW I was able to hit the new limit too, and again just removing the assertion fixes it just fine :( I really think we should just remove that assertion - isn't it better to maybe have a crash somewhere that nobody is really sure exists, than definitely have a crash somewhere? (an assertion failure is a crash, It breaks my usage). |
Well, a buffer overrun can be more damaging than just a crash. Maybe we should just crank the buffer size up to ludicrous mode? |
I removed the assertion and logged the longest len value I saw, I got 9976. No crash. I recompiled with Do you know where the buffer overrun might happen, or what command? I can try artificially making a ledger that pushes the length even higher, my suspicion is the assertion is just obsolete! |
Okay, I just made a transaction with thousands of bogus lots to artificially increase length. I verified that no length up to 36267 crashes (also with address sanitizer, of course). The output seems correct too. |
(It doesn't crash higher than that too, if there is a length where it crashes I don't know what it is) |
Let's bump to 32K? |
I was trying out this example John posted to the mailing list:
But it causes an assertion failure for me:
I tracked it down to this transaction, which is a stock purchase followed by a bunch of automatic dividend reinvestments (numbers changed for privacy):
Reproduce:
The text was updated successfully, but these errors were encountered: