Comments (6)
Hi,
thanks for reporting the issue. Here's the original implementation for reference.
I'd have a few questions:
- Is this a warning, or an error?
- Could you give more details about the callstack? This is a macro, so the issue could be on the caller side.
- What version of gcc are you using? Could you repro it on the linux CI?
The important thing for me is to understand if there is really an error, in which case it needs to be fixed. Your implementation is also accessing a and b, so I don't see how it fixes the error. What do you think?
Cheers,
Guillaume
from ozz-animation.
Here's the first error with all related lines:
inlined from ‘void ozz::io::internal::Array<_Ty>::Load(ozz::io::IArchive&, uint32_t) const [with _Ty = float]’ at .../ozz-utils/ozz-animation/include/ozz/base/io/archive.h:369:1, inlined from ‘static void ozz::io::Extern<_Ty>::Load(ozz::io::IArchive&, _Ty*, size_t, uint32_t) [with _Ty = const ozz::io::internal::Array<float>]’ at .../ozz-utils/ozz-animation/include/ozz/base/io/archive.h:280:18, inlined from ‘void ozz::io::IArchive::operator>>(_Ty&) [with _Ty = const ozz::io::internal::Array<float>]’ at .../ozz-utils/ozz-animation/include/ozz/base/io/archive.h:198:22, inlined from ‘static void ozz::io::Extern<ozz::math::Float4>::Load(ozz::io::IArchive&, ozz::math::Float4*, size_t, uint32_t)’ at .../ozz-utils/ozz-animation/src/base/maths/math_archive.cc:68:12:
.../ozz-utils/ozz-animation/include/ozz/base/endianness.h:73:10: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
73 | (_b) = temp;
| ~~~~~^~~~~~
.../ozz-utils/ozz-animation/include/ozz/base/endianness.h:106:7: note: in expansion of macro ‘OZZ_BYTE_SWAP’
106 | OZZ_BYTE_SWAP(alias[i + 1], alias[i + 2]);
| ^~~~~~~~~~~~~
In file included from .../ozz-utils/ozz-animation/include/ozz/base/maths/box.h:33,
from .../ozz-utils/ozz-animation/src/base/maths/math_archive.cc:33:
.../ozz-utils/ozz-animation/include/ozz/base/maths/vec_float.h: In static member function ‘static void ozz::io::Externozz::math::Float4::Load(ozz::io::IArchive&, ozz::math::Float4*, size_t, uint32_t)’:
.../ozz-utils/ozz-animation/include/ozz/base/maths/vec_float.h:100:9: note: at offset 26 into destination object ‘ozz::math::Float4::x’ of size 4
gcc --version shows:
gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0
Your question:
"Could you repro it on the linux CI?"
I'm not sure... I don't use github in a collaborative manner very often... So I'm afraid that you've gone over my head...
Your concern:
"The important thing for me is to understand if there is really an error"
I think that you are probably right to be suspicious... This is probably the compiler being annoying...
I hope that opening this as an issue was helpful, but I'm afraid that it was not :)
from ozz-animation.
Hi,
yes for sure opening the issue is helpful, others might experience the same issue indeed.
I could repro the compiling issue with the CI, using a gcc 11 release build.
The serialization code considers x,y,... components as contiguous floats in memory, aiming to serialize them at once. My understanding is that the compiler considers them as different float members, hence generates an error when writing further than x.
I think the code is ok, but I understand the error. I need to dig further to see what can be done.
Don't hesitate if you have an idea or a different analysis.
Thanks,
Guillaume
from ozz-animation.
For what it's worth, I've been using the fix I first mentioned without problems. Glad I could help, and thanks for the reply.
from ozz-animation.
mark ,thanks
from ozz-animation.
Suggested fix committed.
from ozz-animation.
Related Issues (20)
- [Guidance] Animation Blending with constraints
- ozz::Maths::Float 4x4 problem HOT 2
- how to view bvh animation? HOT 7
- examples on how to integrate with OpenGL? HOT 2
- What CLI options did you exactly use to create the media/bin/*.ozz animations from FBX files? HOT 4
- Animation Playback HOT 25
- gltf2ozz issue HOT 2
- Trouble getting Skinning to work. HOT 3
- Make a new master release HOT 3
- glTF and FBX skeleton difference HOT 1
- The 'install' -target for make tries to change permissions on existing directories HOT 4
- The 'install' -target places some files in the installation root directory HOT 2
- Feedback/Suggestion: the exclusion of mesh data in ozz tooling makes the library less confortable to use
- Decoupling SamplingJob from file format HOT 2
- Skinning job doesn't preserve tangent handedness HOT 1
- Log adds a dependency on the standard C++ library for runtime HOT 2
- Failed to build on MSYS2 MINGW64 HOT 7
- gltf2ozz is not filtering out non joint nodes HOT 1
- How to define pole vector for two bone IK? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ozz-animation.