Bug 396044 - ajc compiler exits with status code 0 on OOM error
Summary: ajc compiler exits with status code 0 on OOM error
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.7.2   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-07 09:21 EST by Carlos Vara CLA
Modified: 2013-01-28 11:47 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Vara CLA 2012-12-07 09:21:48 EST
It seems ajc Main.java will add an uncategorized message when an OutOfMemoryError is caught, but the systemExit method which is called afterwards will only exit with a non 0 status if a message categorized as FAIL or ERROR is present.

Returning 0 in this case can interact badly with some ant runs as they may interpret it as a successful execution of the ajc task.

See: http://git.eclipse.org/c/aspectj/org.aspectj.git/tree/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java#n256
Comment 1 Andrew Clement CLA 2013-01-28 11:47:25 EST
will exit with -1 now on out of memory.