Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors with -DGC_DEBUG -DMRB_GC_STRESS #3584

Closed
yyamano opened this issue Apr 4, 2017 · 1 comment
Closed

Build errors with -DGC_DEBUG -DMRB_GC_STRESS #3584

yyamano opened this issue Apr 4, 2017 · 1 comment

Comments

@yyamano
Copy link
Contributor

yyamano commented Apr 4, 2017

I got the following compile errors with -DGC_DEBUG -DMRB_GC_STRESS. The problem is that debug log is written to stdout. Are there any reasons to not use stderr?

CC    build/host/mrblib/mrblib.c -> build/host/mrblib/mrblib.o
/home/vagrant/mruby/build/host/mrblib/mrblib.c:12:10: error: expected declaration specifiers or '...' before numeric constant
 obj_free(0x2139140,tt=16)
          ^
/home/vagrant/mruby/build/host/mrblib/mrblib.c:12:20: error: unknown type name 'tt'
 obj_free(0x2139140,tt=16)
                    ^
/home/vagrant/mruby/build/host/mrblib/mrblib.c:12:10: error: expected declaration specifiers or '...' before numeric constant
 obj_free(0x2139140,tt=16)
          ^
/home/vagrant/mruby/build/host/mrblib/mrblib.c:12:20: error: unknown type name 'tt'
 obj_free(0x2139140,tt=16)
                    ^
rake aborted!

/home/vagrant/mruby/build/host/mrblib/mrblib.c

      6 void
      7 mrb_init_mrblib(mrb_state *mrb)
      8 {
      9   mrb_load_irep(mrb, mrblib_irep);                                                                                        
     10 }
     11
     12 obj_free(0x2139140,tt=16)
     13 obj_free(0x2139140,tt=16)
     14 obj_free(0x2139140,tt=16)
     15 obj_free(0x2139140,tt=16)

https://github.com/mruby/mruby/blob/master/src/gc.c#L704

DEBUG(printf("obj_free(%p,tt=%d)\n",obj,obj->tt));
@take-cheeze
Copy link
Contributor

Seems like in mrbc the debug message is printed to generated file.
You should use those flag in non-host(or default) MRuby::Build.

@matz matz closed this as completed in 7f37c2f Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants