# \[1.9/trunk\] Bus error / abort trop with latest sources

**URL:** <https://www.ruby-forum.com/t/1-9-trunk-bus-error-abort-trop-with-latest-sources/105070>\
**Category:** Ruby\
**Created:** [May 25, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/1-9-trunk-bus-error-abort-trop-with-latest-sources/105070 "2007-05-25T14:43:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![keltia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/da6949/32.png) [@keltia](https://www.ruby-forum.com/u/keltia)\
**Post date:** [May 25, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/1-9-trunk-bus-error-abort-trop-with-latest-sources/105070/1 "2007-05-25T14:43:53Z")

</div>

Hello,

I’m compiling Ruby 1.9 from the SVN tree, latest changeset is 12384 on  
OS  
X/PPC 10.4.9.

It fails during compilation with the following message:

## … gcc -O -pipe -pipe -fno-common -L. main.o libruby-static.a -lpthread -ldl -lobjc -o miniruby : – stack frame ------------ 0000 (0x126000): 00000000 \<- lfp \<- dfp – control frame ---------- c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------

[BUG] Bus Error  
ruby 1.9.0 (2007-05-25) [powerpc-darwin8.9.0]

Running miniruby and pressing ^D leads to the same message. miniruby -v,  
same.

Am I the only one? I’ve tried make clean, rerunning configure, changing  
-O2  
into -O, no success.

Thanks.

---

<div class="post-metadata">

**Author:** ![keltia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/da6949/32.png) [@keltia](https://www.ruby-forum.com/u/keltia)\
**Post date:** [May 25, 2007, 3:23pm UTC](https://www.ruby-forum.com/t/1-9-trunk-bus-error-abort-trop-with-latest-sources/105070/2 "2007-05-25T15:23:46Z")

</div>

Hi,

At Fri, 25 May 2007 21:43:54 +0900,  
Ollivier R. wrote in [ruby-talk:252956]:

> [BUG] Bus Error  
> ruby 1.9.0 (2007-05-25) [powerpc-darwin8.9.0]

What command failed?

> Running miniruby and pressing ^D leads to the same message. miniruby -v,  
> same.

It’s a known bug.

# Index: compile.c

— compile.c (revision 12384)  
+++ compile.c (working copy)  
@@ -145,5 +145,8 @@ rb\_iseq\_compile(VALUE self, NODE \*node)  
GetISeqPtr(self, iseq);

- if (nd\_type(node) == NODE\_SCOPE) {

- if (node == 0) {
- COMPILE(ret, “nil”, node);
- }
- else if (nd\_type(node) == NODE\_SCOPE) {  
/\* iseq type of top, method, class, block \*/  
set\_local\_table(iseq, node-\>nd\_tbl);  
@@ -198,7 +201,4 @@ rb\_iseq\_compile(VALUE self, NODE \*node)  
COMPILE(ret, “defined guard”, node);  
}

- else if (node == 0) {
- 

```
 COMPILE(ret, "nil", node);

```

- }  
else {  
rb\_bug(“unknown scope”);

---

<div class="post-metadata">

**Author:** ![keltia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/da6949/32.png) [@keltia](https://www.ruby-forum.com/u/keltia)\
**Post date:** [May 30, 2007, 4:17pm UTC](https://www.ruby-forum.com/t/1-9-trunk-bus-error-abort-trop-with-latest-sources/105070/3 "2007-05-30T16:17:11Z")

</div>

In article  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid),  
Nobuyoshi N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> What command failed?

My guess is that it is miniruby which fails.

> > Running miniruby and pressing ^D leads to the same message. miniruby -v,  
> > same.
> 
> It’s a known bug.

Is it committed in trunk?

Any news on the bug where trying to use “-r debug” does not work because  
a hook is not yet available (according to ko1)? I can not switch (and  
therefore test) 1.9 is the debugger is not usable…

Thanks.

---

<div class="post-metadata">

**Author:** ![keltia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/da6949/32.png) [@keltia](https://www.ruby-forum.com/u/keltia)\
**Post date:** [June 1, 2007, 7:09am UTC](https://www.ruby-forum.com/t/1-9-trunk-bus-error-abort-trop-with-latest-sources/105070/4 "2007-06-01T07:09:52Z")

</div>

Hi,

At Wed, 30 May 2007 23:15:09 +0900,  
Ollivier R. wrote in [ruby-talk:253586]:

> > What command failed?
> 
> My guess is that it is miniruby which fails.

Yes, obviously. What I asked is what miniruby was about to do.

> > > Running miniruby and pressing ^D leads to the same message. miniruby -v,  
> > > same.
> > 
> > It’s a known bug.
> 
> Is it committed in trunk?

Yes.

Sat May 26 00:38:21 2007 Nobuyoshi N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

- eval.c (ruby\_exec\_internal): do nothing if no code.

- compile.c (rb\_iseq\_compile): check node if NULL before check  
nd\_type. [ruby-talk:252956]

> Any news on the bug where trying to use “-r debug” does not  
> work because a hook is not yet available (according to ko1)?  
> I can not switch (and therefore test) 1.9 is the debugger is  
> not usable…

Thank you, I’ve investigated it, and will fix it.

---

<div class="post-metadata">

**Author:** ![keltia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/da6949/32.png) [@keltia](https://www.ruby-forum.com/u/keltia)\
**Post date:** [June 11, 2007, 11:08am UTC](https://www.ruby-forum.com/t/1-9-trunk-bus-error-abort-trop-with-latest-sources/105070/5 "2007-06-11T11:08:45Z")

</div>

Nobuyoshi N. wrote:

> Yes, obviously. What I asked is what miniruby was about to do.

I think the very first invocation of miniruby during the compilation  
process is failling.

> > Is it committed in trunk?

The compilation still faisl with the bus error but as for miniruby -v:

Now, it is just looping away, eating CPU cycles ☹

## gcc -O -pipe -pipe -fno-common -I. -I.ext/include/powerpc-darwin8.9.0 -I…/include -I… -DRUBY\_EXPORT -c …/main.c gcc -O -pipe -pipe -fno-common -L. main.o libruby-static.a -lpthread -ldl -lobjc -o miniruby : – stack frame ------------ 0000 (0x128000): 00000000 \<- lfp \<- dfp – control frame ---------- c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------

[BUG] Bus Error  
ruby 1.9.0 (2007-06-10) [powerpc-darwin8.9.0]

make: \*\*\* [.rbconfig.time] Abort trap  
353 [10:50] roberto@robertotmp-al:yarv/build\> ./miniruby -v  
^D  
^D

^C^C^C^C^Zload: 0.28 cmd: miniruby 27571 running 0.28u 3.49s  
load: 0.28 cmd: miniruby 27571 running 0.39u 4.78s

^C^C^C^Z

I have to kill it in another window. It is a plain 1.9 at changeset  
#12515.

> Thank you, I’ve investigated it, and will fix it.

As soon as I get a working ruby, I’ll test it, thanks.

---

<div class="post-metadata">

**Author:** ![keltia](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/da6949/32.png) [@keltia](https://www.ruby-forum.com/u/keltia)\
**Post date:** [June 12, 2007, 3:29pm UTC](https://www.ruby-forum.com/t/1-9-trunk-bus-error-abort-trop-with-latest-sources/105070/6 "2007-06-12T15:29:09Z")

</div>

Ollivier R. wrote:

> [BUG] Bus Error  
> ruby 1.9.0 (2007-06-10) [powerpc-darwin8.9.0]

Interestingly enough, the same sources on an Intel Mac (MBP) does not  
dump core.

> I have to kill it in another window. It is a plain 1.9 at changeset  
> #12515.

This happens on the macbook pro as well though.

> > Thank you, I’ve investigated it, and will fix it.
> 
> As soon as I get a working ruby, I’ll test it, thanks.

It does not work.
