Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

OS X 10.5.{6,7} GCC 4.2.1 Non-debug Build Fails #12

Closed
rue opened this Issue · 1 comment

2 participants

@rue
Collaborator

Apparently the -O2 flag causes some type of a problem; -O1 etc. work fine, as does rake build:debug (-O0). Using GCC=gcc-4.0 on the same system works without problems.

This appears to be specifically related to the compiler. This is the end of the build output, same error occurs e.g. trying to run bin/mspec.

Compiling lib/sexp_processor.rb
cp kernel/bootstrap/load_order.txt runtime/bootstrap/load_order.txt
cp kernel/platform/load_order.txt runtime/platform/load_order.txt
cp kernel/common/load_order.txt runtime/common/load_order.txt
cp kernel/delta/load_order.txt runtime/delta/load_order.txt
cp kernel/compiler/load_order.txt runtime/compiler/load_order.txt
Building extension lib/ext/readline
./bin/rbx compile -p -I/Users/ruerue/code/rubinius/master/vm/capi -C,-pipe -C,-Wall -C,-DBASE_PATH=\"/Users/ruerue/code/rubinius/master\" -C,-DRBA_PATH=\"/Users/ruerue/code/rubinius/master/runtime\" lib/ext/readline
Compilation error detected: No method 'unshift' on an instance of NilClass.
near (unknown):0

Kernel(NilClass)#unshift (method_missing) at kernel/delta/kernel.rb:47
Compiler::Node::Arguments#consume {} at kernel/compiler/nodes.rb:130
Array(Sexp)#each at kernel/bootstrap/array_186.rb:9
Compiler::Node::Arguments#consume at kernel/compiler/nodes.rb:120
Compiler::Node::Arguments.create at kernel/compiler/node.rb:84
Compiler#convert_sexp at kernel/compiler/compiler.rb:258
Compiler::Node(Compiler::Node::Define)#convert at kernel/compiler/node.rb:116
Compiler::Node::ClosedScope(Compiler::Node::Define)#consume {} at kernel/compiler/nodes.rb:586
Compiler#set at kernel/compiler/compiler.rb:282
Compiler::Node(Compiler::Node::Define)#set at kernel/compiler/node.rb:145
Compiler::Node::ClosedScope(Compiler::Node::Define)#consume at kernel/compiler/nodes.rb:585
Compiler::Node::Define#consume {} at kernel/compiler/nodes.rb:821
Compiler#set at kernel/compiler/compiler.rb:282
Compiler::Node(Compiler::Node::Define)#set at kernel/compiler/node.rb:145
Compiler::Node::Define#consume at kernel/compiler/nodes.rb:820
Compiler::Node::Define.create at kernel/compiler/node.rb:84
Compiler#convert_sexp at kernel/compiler/compiler.rb:258
Compiler::Node(Compiler::Node::Block)#consume {} at kernel/compiler/node.rb:127
Array(Sexp)#each at kernel/bootstrap/array_186.rb:9
Compiler::Node(Compiler::Node::Block)#consume at kernel/compiler/node.rb:125
Compiler::Node::Block.create at kernel/compiler/node.rb:84
Compiler#convert_sexp at kernel/compiler/compiler.rb:258
Compiler::Node(Compiler::Node::Scope)#convert at kernel/compiler/node.rb:116
Compiler::Node::Scope#consume at kernel/compiler/nodes.rb:2373
Compiler::Node::Scope.create at kernel/compiler/node.rb:84
Compiler#convert_sexp at kernel/compiler/compiler.rb:258
Compiler::Node(Compiler::Node::Class)#convert at kernel/compiler/node.rb:116
Compiler::Node::ClosedScope(Compiler::Node::Class)#consume {} at kernel/compiler/nodes.rb:586
Compiler#set at kernel/compiler/compiler.rb:282
Compiler::Node(Compiler::Node::Class)#set at kernel/compiler/node.rb:145
Compiler::Node::ClosedScope(Compiler::Node::Class)#consume at kernel/compiler/nodes.rb:585
Compiler::Node::Class#consume {} at kernel/compiler/nodes.rb:530
Compiler#set at kernel/compiler/compiler.rb:282
Compiler::Node(Compiler::Node::Class)#set at kernel/compiler/node.rb:145
Compiler::Node::Class#consume at kernel/compiler/nodes.rb:529
Compiler::Node::Class.create at kernel/compiler/node.rb:84
Compiler#convert_sexp at kernel/compiler/compiler.rb:258
Compiler::Node(Compiler::Node::Block)#consume {} at kernel/compiler/node.rb:127
Array(Sexp)#each at kernel/bootstrap/array_186.rb:9
Compiler::Node(Compiler::Node::Block)#consume at kernel/compiler/node.rb:125
Compiler::Node::Block.create at kernel/compiler/node.rb:84
Compiler#convert_sexp at kernel/compiler/compiler.rb:258
Compiler::Node(Compiler::Node::Script)#convert at kernel/compiler/node.rb:116
Compiler::Node::ClosedScope(Compiler::Node::Script)#consume {} at kernel/compiler/nodes.rb:586
Compiler#set at kernel/compiler/compiler.rb:282
Compiler::Node(Compiler::Node::Script)#set at kernel/compiler/node.rb:145
Compiler::Node::ClosedScope(Compiler::Node::Script)#consume at kernel/compiler/nodes.rb:585
Compiler::Node::Script.create at kernel/compiler/node.rb:84
Compiler#convert_sexp at kernel/compiler/compiler.rb:258
Compiler#into_script at kernel/compiler/compiler.rb:263
Compiler.compile_file at kernel/compiler/compiler.rb:55
Compiler::Utils.compile_file at kernel/compiler/compile.rb:36
Compiler::Utils.single_load {} at kernel/compiler/compile.rb:199
Compiler::Utils.compile_feature at kernel/compiler/compile.rb:142
Compiler::Utils.single_load at kernel/compiler/compile.rb:198
Compiler::Utils.unified_load at kernel/compiler/compile.rb:89
Kernel(Object)#load at kernel/common/kernel.rb:667
Object#script at kernel/loader.rb:268
rake aborted!
Command failed with status (1): [./bin/rbx compile -p -I/Users/ruerue/code...]

(See full trace by running task with --trace)
02:06:27 @paws ~/code/rubinius/master:master > uname -a
Darwin paws.local 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386 i386
02:08:49 @paws ~/code/rubinius/master:master > gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc_42/gcc_42-5566~1/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5566)
02:08:55 @paws ~/code/rubinius/master:master >

@evanphx
Owner

Rework the rotate instruction (gcc 4.2 fix)

The old code somehow exposed a bug in gcc 4.2. This code seems to work
fine on 4.2 and 4.0.

Closed by cc26edb

@dbussink dbussink referenced this issue from a commit
@dbussink dbussink Guard memory allocations for JIT memory with spinlock
This fixes a crash issue where the JIT was running independent from the
GC and the GC was deallocating JIT memory at the same time. We don't
want to make the whole JIT generation GC dependent, since that causes
performance issues, so we guard all memory allocations here with a
spinlock.

The crash would be exposed with these backtraces where things were
modified concurrently:

Thread 6 (process 70553):
 #0  rubinius::jit::FreeRangeHeader::AddToFreeList () at /Users/dirkjan/Code/rubinius/vm/llvm/jit_memory_manager.hpp:151
 #1  0x000000010989f037 in rubinius::jit::MemoryRangeHeader::TrimAllocationToSize (this=0x10f7ec688, FreeList=0x10f7ec688, NewSize=5064) at vm/llvm/jit_memory_manager.cpp:211
 #2  0x000000010989bb75 in rubinius::jit::RubiniusRequestJITMemoryManager::endFunctionBody (this=<value temporarily unavailable, due to optimizations>, F=<value temporarily unavailable, due to optimizations>, FunctionStart=<value temporarily unavailable, due to optimizations>, FunctionEnd=0x13c8 <Address 0x13c8 out of bounds>) at jit_memory_manager.hpp:317
 #3  0x0000000109b4f852 in (anonymous namespace)::JITEmitter::finishFunction ()
 #4  0x0000000109946106 in (anonymous namespace)::Emitter<llvm::JITCodeEmitter>::runOnMachineFunction ()
 #5  0x0000000109bbbc30 in llvm::MachineFunctionPass::runOnFunction ()
 #6  0x0000000109f1beb2 in llvm::FPPassManager::runOnFunction ()
 #7  0x0000000109f1b9f9 in llvm::FunctionPassManagerImpl::run ()
 #8  0x0000000109f1b8a1 in llvm::FunctionPassManager::run ()
 #9  0x0000000109b461ab in llvm::JIT::runJITOnFunctionUnlocked ()
 #10 0x0000000109b46148 in llvm::JIT::runJITOnFunction ()
 #11 0x0000000109898fcc in rubinius::jit::Compiler::generate_function (this=0x10d485d38, indy=true) at vm/llvm/jit_compiler.cpp:118
 #12 0x00000001098ada93 in rubinius::BackgroundCompilerThread::perform (this=0x7fce81633240) at vm/llvm/state.cpp:345
 #13 0x00000001098ad4ef in rubinius::utilities::thread::Thread::delete_on_exit () at /Users/dirkjan/Code/rubinius/vm/util/thread.hpp:79
 #14 0x00000001098ad4ef in rubinius::utilities::thread::Thread::trampoline (arg=0x7fce81633240) at thread.hpp:211
 #15 0x00007fff8e73c7a2 in _pthread_start ()
 #16 0x00007fff8e7291e1 in thread_start ()

Thread 5 (process 70553):
 #0  0x00007fff952b5386 in __semwait_signal ()
 #1  0x00007fff8e7c6800 in nanosleep ()
 #2  0x00007fff8e7c668a in sleep ()
 #3  0x000000010969c9dd in rubinius::segv_handler (sig=11) at vm/environment.cpp:211
 #4  <signal handler called>
 #5  rubinius::jit::FreeRangeHeader::AddToFreeList () at /Users/dirkjan/Code/rubinius/vm/llvm/jit_memory_manager.hpp:151
 #6  0x000000010989ee53 in rubinius::jit::MemoryRangeHeader::FreeBlock (this=0x10f7c88f0, FreeList=<value temporarily unavailable, due to optimizations>) at jit_memory_manager.hpp:155
 #7  0x00000001098ac3e7 in rubinius::LLVMState::remove (this=<value temporarily unavailable, due to optimizations>, func=<value temporarily unavailable, due to optimizations>) at jit_memory_manager.hpp:426
 #8  0x000000010983dde9 in rubinius::CodeManager::sweep (this=0x7fce8180a2d8) at vm/gc/code_manager.cpp:107
 #9  0x0000000109750e7e in rubinius::ObjectMemory::mark () at /Users/dirkjan/Code/rubinius/vm/objectmemory.hpp:634
 #10 0x0000000109750e7e in rubinius::ObjectMemory::collect_mature_finish (this=0x7fce8180a200, state=0x10c94fec8, data=0x7fce8528b220) at vm/objectmemory.cpp:636
 #11 0x0000000109843d8a in rubinius::State::memory () at /Users/dirkjan/Code/rubinius/vm/state.hpp:171
 #12 0x0000000109843d8a in rubinius::ImmixMarker::perform (this=0x7fce8163a720, state=0x10c94fec8) at vm/gc/immix_marker.cpp:172
 #13 0x0000000109843b71 in rubinius::immix_marker_tramp (state=0x10f7ec688) at vm/gc/immix_marker.cpp:18
 #14 0x00000001098094c0 in rubinius::Thread::in_new_thread (ptr=0x7fce86a23e70) at vm/builtin/thread.cpp:250
 #15 0x00007fff8e73c7a2 in _pthread_start ()
 #16 0x00007fff8e7291e1 in thread_start ()
1bde000
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.