Issue Type: Bug Bug
Affects Versions: 1.1.2
Assignee: Logback dev list
Components: logback-classic
Created: 05/Nov/14 12:27 AM
Description:

If an exception with a circular-referenced-suppressed exception is logged, logback will throw a StackOverflowError:

Exception e1 = new Exception();
Exception e2 = new Exception();
e2.addSuppressed(e1);
e1.addSuppressed(e2);
LoggerFactory.getLogger("root").error("Error", e1);

Will throw the following:

Exception in thread "main" java.lang.StackOverflowError
	at java.lang.ReflectiveOperationException.<init>(ReflectiveOperationException.java:89)
	at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:72)
	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:69)
	at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:75)
	at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:75)
	...

A simple stack trace printout will produce the following:

java.lang.Exception
	at NewClass.main(NewClass.java:95)
	Suppressed: java.lang.Exception
		at NewClass.main(NewClass.java:96)
	[CIRCULAR REFERENCE:java.lang.Exception]
Environment:

All

Project: logback
Priority: Major Major
Reporter: Kenneth Gendron
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira