Navigation Menu

Skip to content
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

jnaerator-0.9.10-SNAPSHOT-shaded.jar unable to process malloc def #278

Closed
rit001 opened this issue Mar 1, 2012 · 1 comment
Closed

jnaerator-0.9.10-SNAPSHOT-shaded.jar unable to process malloc def #278

rit001 opened this issue Mar 1, 2012 · 1 comment

Comments

@rit001
Copy link

rit001 commented Mar 1, 2012

If the following 2 lines are placed in a .h file and passed to jnaerator, an error occurs


free( void * _Memory);
malloc( int _Size);


The output placed in _jnaerator.rawParsed.cpp only contains the following as jnaerator stops all further processing at the malloc line


free(void* _Memory);


If the following .h file is used instead it works correctly


free( void * _Memory);
malloc1( int _Size);


The output placed in _jnaerator.rawParsed.cpp is correct (as shown below)


free(void* _Memory);
malloc1(int _Size);


Looking at the jnaerator source code it is clear that there are dedicated handlers for memory allocation functions, so I am guessing that the handler for malloc has a problem.

Roger

ochafik added a commit that referenced this issue Mar 2, 2012
@ochafik
Copy link
Member

ochafik commented Mar 2, 2012

Hi @rit001 ,

Thank you very much for this report.

This wide-ranging bug was caused by interference with the "malloc" and "free" GCC attributes, that shouldn't be parsed outside attribute (fortunately easy to fix !).

Fix was deployed as new 0.9.10-SNAPSHOT

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants