On Mon, 2009-07-06 at 20:28 +0200, Tomek Grabiec wrote: > This introduces vm_throwable_print_stack_trace() which generates > a string which is identical to the one that would be printed > if Throwable.printStackTrace() method is executed. > > Signed-off-by: Tomek Grabiec <tgrab...@gmail.com>
I applied the series. Thanks! > +void vm_print_exception(struct vm_object *exception) > +{ > + struct string *str; > + > + str = alloc_str(); > + if (!str) > + goto error; > + > + /* TODO: print correct thread name */ > + str_append(str, "Exception in thread \"main\" "); > + > + vm_throwable_print_stack_trace(exception, str); > + if (exception_occurred()) > + goto error; > + > + fprintf(stderr, str->value); There's no format specifier here which made GCC scream. That's because -Wformat and -Wformat-error are enabled by default on Ubuntu 8.10 and later. I fixed that up and enabled both warnings on all platforms. We ended up fixing the problem the other way around in Linux kernel by _disabling_ the warning. The decision was mostly driven by the fact that there were so many false positives. This one here doesn't appear to have real security implications either but as the warning only showed up here, I think we can live with it. That said, if it turns out to be a problem, we can always disable it later. > + free_str(str); > + > + return; > +error: > + warn("unable to print exception"); > + if (str) > + free_str(str); > > - NOT_IMPLEMENTED; > + vm_print_exception_description(exception); > } ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel