-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Bug: Fails to build with GCC 11 because warnings treated as errors #4126
Comments
The glTF "bug" is semi-bogus. The only way It'd crash either way though, no way can you allocate the many terabytes that implies... The array is explicitly created at a size Eg in the test That said, the next line could assert as some of the IOStream classes will assert for zero count - I guess that is a bug, as fread returns zero for zero item size or zero item count so all the IOStreams should too. |
What would you suggest is a "sane" maximum size? I'd guess at ~4GB (max. uint32_t) |
The m3d format is 3rd party code- https://gitlab.com/bztsrc/model3d I've had a look at upstream and it seems bzt has made quite a few changes since they parachuted their code into assimp. I would recommend disabling m3d by default for the 5.1.0 release to get it out of the door, then start work on syncing to upstream. |
I will disable it for 5.1 until we have a fix. |
You should add a way to disable warnings as errors and then disable it in releases by default. Otherwise the next new compiler will probably also fail to build because of new warnings. |
Debian testing with GCC 11.2.0:
assimp/code/AssetLib/M3D/m3d.h:4267:46: error: array subscript ‘uint64_t {aka long unsigned int}[0]’ is partly outside array bounds of ‘unsigned char [4]’ [-Werror=array-bounds]
assimp/code/AssetLib/M3D/m3d.h:3097:43: note: while referencing ‘weights’
assimp/code/AssetLib/M3D/m3d.h
Line 4267 in a83db61
assimp/code/AssetLib/glTF/glTFAsset.inl:1185:29: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
assimp/code/AssetLib/glTF/glTFAsset.inl
Line 1185 in a83db61
This should be a release blocker for 5.1.0. These need to either be fixed or warnings as errors mode disabled.
The text was updated successfully, but these errors were encountered: