Commit cb174c23 authored by Cédric Boutillier's avatar Cédric Boutillier

remove patches. not needed anymore

parent 8eb6a358
Description: SpawnAttributes is 336 bytes on 64bit linux
Allocation 128 bytes causes memory corruption on 64 bit linux. Because
the structure underneath is bigger. Increase the size.
Author: Eugene Pimenov <eugene@libc.st>
Origin: https://github.com/libc/spoon/commit/9eceb369adf086ad407bd562f74fb43a4e1c2c02
Reviewed-by: Cédric Boutillier <boutil@debian.org>
Last-Update: 2012-12-26
---
lib/spoon/unix.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/lib/spoon/unix.rb
+++ b/lib/spoon/unix.rb
@@ -51,7 +51,7 @@
class SpawnAttributes
attr_reader :pointer
- SIZE = FFI::Platform.mac? ? FFI.type_size(:pointer) : 128
+ SIZE = FFI::Platform.mac? ? FFI.type_size(:pointer) : 336
def initialize
@pointer = FFI::AutoPointer.new(LibC.malloc(SIZE), self.class)
Description: AutoPointer does not support classes in ffi gem
FFI gem (for MRI) does not support passing classes for deallocator. Use
pass unbound method, since it's supported by both rubies.
Origin: https://github.com/libc/spoon/commit/4454035a6db686ee4ca364d68a4fdc756168a1f9
Author: Eugene Pimenov <eugene@libc.st>
Reviewed-by: Cédric Boutillier <boutil@debian.org>
Last-Update: 2012-12-26
---
lib/spoon/unix.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/lib/spoon/unix.rb
+++ b/lib/spoon/unix.rb
@@ -20,7 +20,7 @@
SIZE = FFI::Platform.mac? ? FFI.type_size(:pointer) : 128
def initialize
- @pointer = FFI::AutoPointer.new(LibC.malloc(SIZE), self.class)
+ @pointer = FFI::AutoPointer.new(LibC.malloc(SIZE), self.class.method(:release))
error = LibC.posix_spawn_file_actions_init(@pointer)
raise SystemCallError.new("posix_file_actions_init", error) unless error == 0
end
@@ -54,7 +54,7 @@
SIZE = FFI::Platform.mac? ? FFI.type_size(:pointer) : 336
def initialize
- @pointer = FFI::AutoPointer.new(LibC.malloc(SIZE), self.class)
+ @pointer = FFI::AutoPointer.new(LibC.malloc(SIZE), self.class.method(:release))
error = LibC.posix_spawnattr_init(@pointer)
raise SystemCallError.new("posix_spawnattr_init", error) unless error == 0
end
increase_size_spawnattributes.patch
pass_release_method.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment