harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r453132 - /incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp
Date Thu, 05 Oct 2006 08:11:55 GMT
Author: hindessm
Date: Thu Oct  5 01:11:54 2006
New Revision: 453132

URL: http://svn.apache.org/viewvc?view=rev&rev=453132
Log:
Applying fix from "[#HARMONY-1707] find_stack_* signals_em64t.cpp patch".

Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp?view=diff&rev=453132&r1=453131&r2=453132
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp Thu
Oct  5 01:11:54 2006
@@ -225,19 +225,20 @@
 
     pthread_t thread = pthread_self();
     err = pthread_getattr_np(thread, &pthread_attr);
+    assert(!err);
     err = pthread_attr_getstack(&pthread_attr, &stack_addr, &stack_size);
+    assert(!err);
     pthread_attr_destroy(&pthread_attr);
-    return stack_addr;
+    return (void *)((unsigned char *)stack_addr + stack_size);
 }
 
 inline size_t find_stack_size() {
     int err;
-    void *stack_addr;
     size_t stack_size;
     pthread_attr_t pthread_attr;
 
     pthread_attr_init(&pthread_attr);
-    err = pthread_attr_getstack(&pthread_attr, &stack_addr, &stack_size);
+    err = pthread_attr_getstacksize(&pthread_attr, &stack_size);
     pthread_attr_destroy(&pthread_attr);
     return stack_size;
 }



Mime
View raw message