-
Notifications
You must be signed in to change notification settings - Fork 11
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
CEE0810 Error on Reallocate Statement #6
Comments
Hi @acejoh! Thanks for sharing the problem. As you said the problem relies here, in allocSpace, because of the pointer field being dirty and not null, the %realloc branch is choosen.
I'm thinking of a way to centralize the solution in here, and not for each procedure, as we could forget if we add other operations. Btw, it's nice to see someone using this code. I hope I coded it well |
I'm not exactly sure how many, probably in the hundreds, not thousands. Interestingly, it was (or seemed) deterministic: my program would crash on the same index, every time. |
@acejoh We can do as you proposed, or we can MONITOR -> ON-ERROR in allocSpace and go with %alloc. |
I didn't think of that, that's a good idea. Could potentially hide other real errors though? |
@acejoh We can Btw, you could just set them to |
Ofcourse, I forget about the ability to monitor for specific messages. In that case I think it's a good idea to implement both solutions (initializing newly allocated data and monitoring for errors), for me personally stability takes precedence over performance in this case. If you want I can try to do some performance tests though? |
@acejoh It's nothing : ) Well those fields contain addresses that will be overridden by the |
Hi,
Thanks for sharing your code. I ran into an issue when adding a 'large' amount of entries to my hashmap. After a while I would get a CEE0810 Error on a hashmapPut call.
After some testing I discovered that the problem lies in the addEntry procedure:
Space is allocated but not initialized. As a result entry.keyPtr and entry.valuePtr could contain garbage and this causes allocSpace to fail with the CEE0810 error.
My solution was to add a "clear entry" statement after allocSpace(entryPtr:ENTRY_SIZE);
The same problem applies to arraylist: (arrayAdd procedure)
Kind regards
The text was updated successfully, but these errors were encountered: