forked from rubinius/rubinius
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix/range min max with mri on x19 #5
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Range#first has different behavior with Range#begin from Ruby 1.9. It should return the first element, or the first n elements. range = 0..2 range.begin #=> 0 range.begin(2) #=> ArgumentError range.first #=> 0 range.first(2) #=> [0, 1]
…argument_on_X19 Range#first has different behavior with Range#begin from Ruby 1.9
SIZEOF_BDIGITS and RBIGNUM_LEN need to match up. Fixes a test failure in sqlite3-ruby.
Socket#socketpair `type` argument can accept a symbol that references to a `Socket::SOCK_*` constant. require 'socket' # Before Socket.socketpair(Socket::PF_UNIX, Socket::SOCK_DGRAM, 0) # => [#<Socket:fd 11>, #<Socket:fd 12>] Socket.socketpair(Socket::PF_UNIX, :DGRAM, 0) # => TypeError: Tried to use non-reference value 0x15a86 as type Bignum (10) # After Socket.socketpair(Socket::PF_UNIX, Socket::SOCK_DGRAM, 0) # => [#<Socket:fd 7>, #<Socket:fd 8>] Socket.socketpair(Socket::PF_UNIX, :DGRAM, 0) # => [#<Socket:fd 9>, #<Socket:fd 10>] Fixes rubinius#2011.
…ev_build Document how to Build Rubinius for debugging purposes
The following commit moved some Rational and Complex specs. But didn't update spec tags. Just remove them bacause it's now passing: 1779c73 Rational()/Complex() should be Kernel specs
Remove old tags for Rational and Complex specs
When we inline blocks succesfully in the JIT, we don't need to emit code to create this block on the stack. This is only necessary when we either fail to inline, or when emitting the uncommon case in the jit. This implements a better version of the behavior removed in 897570e because that was buggy. This implementation handles more cases and also doesn't suffer from the bug present in that implementation.
We can simply use the original executable if we encounter an alias.
Before ------- enumerator.rb: define enumerator18.rb: none enumerator19.rb: define After ----- enumerator.rb: none enumerator18.rb: define enumerator19.rb: define
Before ------ constant_scope.rb: define constant_scope18.rb: define constant_scope19.rb: define After ----- constant_scope.rb: none constant_scope18.rb: define constant_scope19.rb: define
* Adjust definition place of Struct.#members * Improve converting type for own version Before ------ struct.rb: define struct18.rb: none struct19.rb: define After ----- struct.rb: define struct18.rb: none struct19.rb: none Thanks for the pointing out. ---------------------------- * #3 (comment) * bbe2d55 * 4774b58
For get consistency of coding in Struct.
This is a private method. Because accessing inner data structures.
…laces_of_some_methods_in_Kernel-common Adjust definition places of some methods in Kernel-common
…ing_in_Struct Improve some code in Struct
…ty_of_Struct-_attrs Modify visibility of Struct#_attrs, "public" to "private"
Fix Socket#socketpair on X19.
This class permits exposing encoding-related aspects of characters without polluting the methods in String.
There are code locations that use a conditional that would check if the encoding_ attribute is nil and exit early. However, those are distant from code that does encoding()->get_encoding() so they can be missed when eg refactoring. We should always use encoding(state) accessor unless there is a very special purpose reason not to.
String#encode returns self when source matches target encoding.
If an exception is raised instantiating the loader, 0 will be returned.
Extracted from ActiveSupport 3.2 test failure.
With this fix ActiveSupport 3.2 tests are green in 1.8 mode.
kachick
pushed a commit
that referenced
this pull request
Jul 12, 2013
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 () rubinius#6 0x0000000109f1beb2 in llvm::FPPassManager::runOnFunction () rubinius#7 0x0000000109f1b9f9 in llvm::FunctionPassManagerImpl::run () rubinius#8 0x0000000109f1b8a1 in llvm::FunctionPassManager::run () rubinius#9 0x0000000109b461ab in llvm::JIT::runJITOnFunctionUnlocked () rubinius#10 0x0000000109b46148 in llvm::JIT::runJITOnFunction () rubinius#11 0x0000000109898fcc in rubinius::jit::Compiler::generate_function (this=0x10d485d38, indy=true) at vm/llvm/jit_compiler.cpp:118 rubinius#12 0x00000001098ada93 in rubinius::BackgroundCompilerThread::perform (this=0x7fce81633240) at vm/llvm/state.cpp:345 rubinius#13 0x00000001098ad4ef in rubinius::utilities::thread::Thread::delete_on_exit () at /Users/dirkjan/Code/rubinius/vm/util/thread.hpp:79 rubinius#14 0x00000001098ad4ef in rubinius::utilities::thread::Thread::trampoline (arg=0x7fce81633240) at thread.hpp:211 rubinius#15 0x00007fff8e73c7a2 in _pthread_start () rubinius#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 rubinius#6 0x000000010989ee53 in rubinius::jit::MemoryRangeHeader::FreeBlock (this=0x10f7c88f0, FreeList=<value temporarily unavailable, due to optimizations>) at jit_memory_manager.hpp:155 rubinius#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 rubinius#8 0x000000010983dde9 in rubinius::CodeManager::sweep (this=0x7fce8180a2d8) at vm/gc/code_manager.cpp:107 rubinius#9 0x0000000109750e7e in rubinius::ObjectMemory::mark () at /Users/dirkjan/Code/rubinius/vm/objectmemory.hpp:634 rubinius#10 0x0000000109750e7e in rubinius::ObjectMemory::collect_mature_finish (this=0x7fce8180a200, state=0x10c94fec8, data=0x7fce8528b220) at vm/objectmemory.cpp:636 rubinius#11 0x0000000109843d8a in rubinius::State::memory () at /Users/dirkjan/Code/rubinius/vm/state.hpp:171 rubinius#12 0x0000000109843d8a in rubinius::ImmixMarker::perform (this=0x7fce8163a720, state=0x10c94fec8) at vm/gc/immix_marker.cpp:172 rubinius#13 0x0000000109843b71 in rubinius::immix_marker_tramp (state=0x10f7ec688) at vm/gc/immix_marker.cpp:18 rubinius#14 0x00000001098094c0 in rubinius::Thread::in_new_thread (ptr=0x7fce86a23e70) at vm/builtin/thread.cpp:250 rubinius#15 0x00007fff8e73c7a2 in _pthread_start () rubinius#16 0x00007fff8e7291e1 in thread_start ()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.