Comments (5)
m_wildcardValue was just the tip of the iceberg. Several other global instances had similar issues. Some of that code is also used in cynarad, so this issue might go beyond just testing.
For the fixes that were good enough for me at the moment, see:
https://github.com/pohly/meta-intel-iot-security/blob/cynara-tests/meta-security-framework/recipes-security/cynara/cynara/PolicyKeyFeature-avoid-complex-global-constants.patch
https://github.com/pohly/meta-intel-iot-security/blob/cynara-tests/meta-security-framework/recipes-security/cynara/cynara/globals-avoid-copying-other-globals.patch
However, you might want to do a more thorough code review and avoid this kind of issue completely. I only fixed the cases that really caused segfaults.
from cynara.
Thanks for finding these issues and for the patches. Yes, we need to get rid of direct std::string -> std::string dependencies. First patch looks good to me.
The second patch if I understand static variable initialization correctly makes it less likely to fail, because there are less variables that we depend on. However, we still rely on variable being referenced to be initialized first (references can point to variable that have not yet been initialized).
I think that all std::string constants should depend on:
a) C string literals/variables
or
b) wrapper functions like in the first patch
from cynara.
The second patch if I understand static variable initialization correctly makes it less likely to fail,
because there are less variables that we depend on. However, we still rely on variable being
referenced to be initialized first (references can point to variable that have not yet been initialized).
Correct. It's just mitigating the problem without solving it properly.
I agree with the proposed solution, but won't have time to implement it, I'm afraid.
from cynara.
Ok, I understand. Right now I'm working on some urgent task, but I should finish soon and I'll be able to take care of it.
from cynara.
I've pushed your first patch to gerrit:
https://review.tizen.org/gerrit/#/c/41353
And also made some more changes:
https://review.tizen.org/gerrit/#/c/41354
from cynara.
Related Issues (7)
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 cynara.