Comments (7)
This seems to be a bug in the Linux libmetal implementation. The function returns void, so it can't return an error on multiple invocations, but it should not create a segfault.
from libmetal.
@sjd-xlnx Can you try #185 to see if this fixes your issue? It works in my limited testing.
from libmetal.
This entire problem could be avoided if libmetal took advantage of the ELF initialization and finalizations sections like most Linux (and other?) libraries. We could avoid the need for explicit initialization and finalization functions entirely.
from libmetal.
Hi, I looked at the proposed change, and it doesn't look right to me.
void metal_finish(void)
{
/* if metal_init() failed, or metal_finish() is called twice, just return */
if (_metal.common.initialized)
return;
metal_sys_finish();
memset(&_metal, 0, sizeof(_metal));
}
Shouldn't it be something like this...
void metal_finish(void)
{
/* if metal_init() failed, or metal_finish() is called twice, just return */
if (!_metal.common.initialized)
return;
metal_sys_finish();
memset(&_metal, 0, sizeof(_metal));
}
or ...
void metal_finish(void)
{
/* if metal_init() failed, or metal_finish() is called twice, just return */
if (_metal.common.initialized) {
metal_sys_finish();
memset(&_metal, 0, sizeof(_metal));
}
return;
}
from libmetal.
You're absolutely correct. The '!' is in my source tree but not in git. I must have messed something up in my edit.
from libmetal.
This issue has been marked as a stale issue because it has been open (more than) 45 days with no activity.
from libmetal.
Should be Fixed by #239, please reopen the issue if not the case.
from libmetal.
Related Issues (20)
- Encode constants with `const`, not `#define` HOT 1
- Support other build systems instead of cmake HOT 3
- Shared memory use with ASAN HOT 4
- where is xsdk/r5_0_bsp/psu_cortexr5_0/include ? HOT 2
- lto1: fatal error: bytecode stream generated with LTO version 8.1 instead of the expected 4.0 HOT 3
- replace master/slave terminology
- Add C++ tests in CI HOT 1
- RZG2L OpenAmp Renesas HOT 1
- ERANGE usage HOT 3
- [Feature request] Open device read-only HOT 5
- Read/write to multiple IO region doesn't seem to work HOT 7
- main branch still using zepher/kernel.h HOT 1
- Checkpatch improvement complain on check report
- Move examples and demos to openamp-system-reference repository HOT 4
- Restructure content in README.md HOT 1
- shmem-provider header file HOT 3
- PATH_MAX undeclared HOT 2
- Remove XLNX_PLATFORM Flag from libmetal HOT 3
- libmetal is too big/complex for normal RTOS usage HOT 1
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 libmetal.