-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add wrapper api which has 8-byte integer specific and another 4-byte integer specific (for better type safety) #370
Comments
We do have a CI github actions build that uses UBSan. It does not seem to show this issue, but I don't know why... I will try a local UBSan build and see if I can reproduce. |
Is the above error caused while running the exodus regression tests, or a different test? |
Many of the VTK tests with
If you try with VTK, be sure to use current master, because a build error with UBSan was recently fixed. |
Is this run on linux or windows or mac? |
Is this a problem with the exodus routine, or is it a problem with the calling routine which passes an unaligned block down into the function that needs 8-byte aligned data? The exodus routine is just filling the 8-byte integers with 8-byte integer data and not doing any of the memory allocation. For example, is a 4-byte integer value being passed into a function that is expecting 8-byte integers? I don't see how else to get an unaligned address into the function... |
Mac.
Dunno. But from the sounds of your analysis, it's looking like the latter I guess.
That's good to know, thanks. It also suggests the issue may be in VTK itself. I'll look a little more on the VTK side... |
OK, for VTK's
The problem is writing to
3rd to last param is So this is only working at all since most CPUs are little endian these days. If |
Yes, that is a disadvantage of the method that is used for 8/4 byte integers and 8/4 byte floats. It would be good to maybe have an additional wrapper api which was 8-byte integer specific and another 4-byte integer specific. I wouldn't replace the current api since it works very well in codes that can switch 4/8-byte integer/float at runtime... |
That does sound like a good idea. Shall we just rename this issue for that purpose? |
It might be good to have that as an issue. I don't know when I would be able to get to it, but maybe someone would see it and decide it is a good way to learn the exodus api and submit a PR... Or, maybe I will find time at some point. |
runtime error: store to misaligned address
in ex_get_block.c
I don't personally use seacas, but I've recently been trying to get all VTK unit tests passing with UBSan
One remaining thing flagged is:
VTK/ThirdParty/exodusII/vtkexodusII/src/ex_get_block.c:65:7: runtime error: store to misaligned address 0x7ff7bdd396c4 for type 'int64_t' (aka 'long long'), which requires 8 byte alignment
VTK's copy of seacas seems to be a year or two old, but the code in your current master looks unchanged at first glance.
Are your own unit tests ever built with UBSan?
The text was updated successfully, but these errors were encountered: