-
Notifications
You must be signed in to change notification settings - Fork 76
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 init strings make hal crash #546
Comments
The function above expects a hex string. However, a range check has been added to the code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello everyone,
HAL can not handle setting too long init strings. When setting an init string of character length 64, hal accepts the string and crashes when selecting the respective gate.
To reproduce this:
Open a netlist that contains at least one LUT6_2 element.
Get the gate with: gate = netlist.get_gate_by_id(x);
Set a long init string with: gate.set_init_data(["1000100110001001100010011000100110001001100010011000100110001001"])
This returns true, so the init string was set.
When clicking on the gate, hal crashes.
The error message is:
[21.12.2023 14:52:41] [python] [info] Python console execute: "gate.set_init_data(["1000100110001001100010011000100110001001100010011000100110001001"])". [21.12.2023 14:52:41] [python] [info] True terminate called after throwing an instance of 'std::out_of_range' what(): stoull
I guess the best fix would be to reject INIT strings that do not meet the expected length of the specified gate. Note that the above could happen when someone tries to set the INIT string in binary representation
The text was updated successfully, but these errors were encountered: