# \[BUG: trunk\]arm-linux$B8~$1%/%m%9%3%s%Q%$%k;~$N%(%i!\<(B

**URL:** <https://www.ruby-forum.com/t/bug-trunk-arm-linux-b8-1-m-9-3-s-q-k-n-i-b/186858>\
**Category:** Development\
**Created:** [April 13, 2010, 2:40pm UTC](https://www.ruby-forum.com/t/bug-trunk-arm-linux-b8-1-m-9-3-s-q-k-n-i-b/186858 "2010-04-13T14:40:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satoshi\_Shiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@Satoshi\_Shiba](https://www.ruby-forum.com/u/Satoshi_Shiba)\
**Post date:** [April 13, 2010, 2:40pm UTC](https://www.ruby-forum.com/t/bug-trunk-arm-linux-b8-1-m-9-3-s-q-k-n-i-b/186858/1 "2010-04-13T14:40:26Z")

</div>

e$B\<G$H?=$7$^$9!%e(B

i686-linuxe$B$+$ie(Barm-linuxe$B8~$1$K%/%m%9%3%s%Q%$%k$r$7$h$&$H$7$?$H$3$m!$e(B  
gc.he$B!$e(Bgc.ce$B!$e(Bthread\_pthread.ce$B$Ne(B3e$B$D$N%U%!%$%k$G%3%s%Q%$%k%(%i!\<$r3NG’$7$^e(B  
e$B$7$?!%e(B  
e$B%-%c%9%H$d%^%/%m$NDj5A!$4X?t$N@k8@$K$A$g$C$H$7$?%\_%9$,$"$k$h$&$G$9!%e(B

e$B%/%m%9%3%s%Q%$%i$Oe(BCodeSourcerye$B$5$s$N$b$N$r;HMQ$7$F$$$^$9!%e(B  
[http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite](http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite)

% ./configure --target=arm-linux --host=arm-linux  
–with-baseruby=ruby-1.9.2-dev CC=arm-none-linux-gnueabi-gcc  
LD=arm-none-linux-gnueabi-gcc AR=arm-none-linux-gnueabi-ar  
RANLIB=arm-none-linux-gnueabi-ranlib

%make  
gc.c:1186: error: conflicting types for ‘ruby\_get\_stack\_grow\_direction’  
gc.h:69: note: previous declaration of ‘ruby\_get\_stack\_grow\_direction’  
was here  
gc.c: In function ‘mark\_current\_machine\_context’:  
gc.c:2118: error: ‘start’ undeclared (first use in this function)  
gc.c:2118: error: (Each undeclared identifier is reported only once  
gc.c:2118: error: for each function it appears in.)  
gc.c:2118: error: ‘end’ undeclared (first use in this function)  
gc.c: In function ‘rb\_gc\_mark\_machine\_stack’:  
gc.c:2225: error: ‘start’ undeclared (first use in this function)  
gc.c:2225: error: ‘end’ undeclared (first use in this function)  
…  
thread\_pthread.c: In function ‘get\_stack’:  
thread\_pthread.c:224: error: invalid use of void expression

e$B0J2\<$N%Q%C%A$G%3%s%Q%$%k$ODL$j$^$7$?!%e(B

# Index: thread\_pthread.c

— thread\_pthread.c (revision 27328)  
+++ thread\_pthread.c (working copy)  
@@ -190,7 +190,7 @@  
#define STACK\_DIR\_UPPER(a,b) STACK\_UPPER(0, a, b)  
#else  
#define STACK\_GROW\_DIR\_DETECTION VALUE stack\_grow\_dir\_detection  
-#define STACK\_DIR\_UPPER(a,b) STACK\_UPPER(&stack\_grow\_dir\_detection, a,  
b)  
+#define STACK\_DIR\_UPPER(a,b) STACK\_UPPER(&stack\_grow\_dir\_detection,  
(a), (b))  
#endif

#if defined HAVE\_PTHREAD\_GETATTR\_NP || defined HAVE\_PTHREAD\_ATTR\_GET\_NP  
@@ -221,7 +221,7 @@

# endif

if (pthread\_attr\_getguardsize(&attr, &guard) == 0) {  
STACK\_GROW\_DIR\_DETECTION;

- STACK\_DIR\_UPPER((void)0, \*addr = (char \*)\*addr + guard);

- STACK\_DIR\_UPPER((void \*)0, \*addr = (char \*)\*addr + guard);  
\*size -= guard;  
}

# else

# Index: gc.c

# — gc.c (revision 27328) +++ gc.c (working copy) @@ -2099,7 +2099,7 @@ #elif STACK\_GROW\_DIRECTION \> 0 #define GET\_STACK\_BOUNDS(start, end, appendix) (start = STACK\_START, end = STACK\_END+appendix) #else -#define GET\_STACK\_BOUNDS(stack\_start, stack\_end, appendix) +#define GET\_STACK\_BOUNDS(start, end, appendix) ((STACK\_END \< STACK\_START) ? (start = STACK\_END, end = STACK\_START) : (start = STACK\_START, end = STACK\_END+appendix)) #endif Index: gc.h

— gc.h (revision 27328)  
+++ gc.h (working copy)  
@@ -66,7 +66,7 @@

# define STACK\_UPPER(x, a, b) b

#else  
RUBY\_EXTERN int ruby\_stack\_grow\_direction;  
-int ruby\_get\_stack\_grow\_direction(VALUE \*addr);  
+int ruby\_get\_stack\_grow\_direction(volatile VALUE \*addr);

# define stack\_growup\_p(x) ( \

(ruby\_stack\_grow\_direction ?   
ruby\_stack\_grow\_direction : \

---

<div class="post-metadata">

**Author:** ![Satoshi\_Shiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@Satoshi\_Shiba](https://www.ruby-forum.com/u/Satoshi_Shiba)\
**Post date:** [April 14, 2010, 7:26am UTC](https://www.ruby-forum.com/t/bug-trunk-arm-linux-b8-1-m-9-3-s-q-k-n-i-b/186858/2 "2010-04-14T07:26:50Z")

</div>

e$B$J$+$@$G$9!#e(B

At Tue, 13 Apr 2010 21:40:07 +0900,  
Satoshi Shiba wrote in [ruby-dev:40973]:

> thread\_pthread.c: In function ‘get\_stack’:  
> thread\_pthread.c:224: error: invalid use of void expression

e$B$3$l$O0J2\<$N$h$&$K$7$F$bDL$j$^$9$+e(B?

# Index: thread\_pthread.c

— thread\_pthread.c (revision 27335)  
+++ thread\_pthread.c (working copy)  
@@ -222,5 +222,5 @@ get\_stack(void \*\*addr, size\_t \*size)  
if (pthread\_attr\_getguardsize(&attr, &guard) == 0) {  
STACK\_GROW\_DIR\_DETECTION;

- STACK\_DIR\_UPPER((void)0, \*addr = (char \*)\*addr + guard);

- STACK\_DIR\_UPPER((void)0, (void)(\*addr = (char \*)\*addr + guard));  
\*size -= guard;  
}

---

<div class="post-metadata">

**Author:** ![Satoshi\_Shiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@Satoshi\_Shiba](https://www.ruby-forum.com/u/Satoshi_Shiba)\
**Post date:** [April 14, 2010, 9:39am UTC](https://www.ruby-forum.com/t/bug-trunk-arm-linux-b8-1-m-9-3-s-q-k-n-i-b/186858/3 "2010-04-14T09:39:44Z")

</div>

e$B%A%1%C%He(B #3145 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!\<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B  
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

This issue was solved with changeset r27338.  
Nobuyoshi, thank you for reporting this issue.  
Your contribution to Ruby is greatly appreciated.  
May Ruby be with you.

* * *

[http://redmine.ruby-lang.org/issues/show/3145](http://redmine.ruby-lang.org/issues/show/3145)

---

<div class="post-metadata">

**Author:** ![Satoshi\_Shiba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@Satoshi\_Shiba](https://www.ruby-forum.com/u/Satoshi_Shiba)\
**Post date:** [April 15, 2010, 7:51pm UTC](https://www.ruby-forum.com/t/bug-trunk-arm-linux-b8-1-m-9-3-s-q-k-n-i-b/186858/4 "2010-04-15T19:51:08Z")

</div>

e$B\<G$H?=$7$^$9!%e(B

Nobuyoshi N. wrote:

> \*size -= guard;  
> }

trunke$B$,\>e5-$N$h$&$KJQ99$5$l$F$$$?$N$G!$%S%k%I$7$F$\_$?$H$3$m!$e(B  
e$BLdBj$J$/DL$j$^$7$?!%e(B
