[macruby-changes] [1637] MacRuby/branches/experimental/vm.cpp

source_changes at macosforge.org source_changes at macosforge.org
Fri May 29 16:33:20 PDT 2009


Revision: 1637
          http://trac.macosforge.org/projects/ruby/changeset/1637
Author:   lsansonetti at apple.com
Date:     2009-05-29 16:33:19 -0700 (Fri, 29 May 2009)
Log Message:
-----------
don't try to symbolicate anything if no function was JIT'ed yet (avoid crash when an exception is raised before command line arguments parsing)

Modified Paths:
--------------
    MacRuby/branches/experimental/vm.cpp

Modified: MacRuby/branches/experimental/vm.cpp
===================================================================
--- MacRuby/branches/experimental/vm.cpp	2009-05-29 21:18:33 UTC (rev 1636)
+++ MacRuby/branches/experimental/vm.cpp	2009-05-29 23:33:19 UTC (rev 1637)
@@ -82,6 +82,9 @@
 
 	struct RoxorFunction *find_function(unsigned char *addr) {
 	     // TODO optimize me!
+	     if (functions.empty()) {
+		return NULL;
+	     }
 	     RoxorFunction *front = functions.front();
 	     RoxorFunction *back = functions.back();
 	     if (addr < front->start || addr > back->end) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090529/d7d5ff2e/attachment.html>


More information about the macruby-changes mailing list