Yukihiro "Matz" Matsumoto
dffb4d82dc
Add type check for cls before allocation
2016-12-06 11:40:49 +09:00
Yukihiro "Matz" Matsumoto
6ec14a2173
Merge pull request #3318 from bouk/splat-stack
...
Fix stack move segfaulting in OP_ARYCAT
2016-12-05 16:51:46 +09:00
Yukihiro "Matz" Matsumoto
ac561a52f5
Add symbol type check for Module#undef_method
2016-12-04 10:41:01 +09:00
Yukihiro "Matz" Matsumoto
5c651d6ce9
add MRB_API to mrb_float_read(); ref #3270
2016-12-03 18:55:52 +09:00
Yukihiro "Matz" Matsumoto
a0fbc46ccd
Import locale insensitive strtod() from Ruby1.8; fix #3270
...
The function was renamed to `mrb_float_read(const char*, char**)`.
2016-12-03 18:47:04 +09:00
Yukihiro "Matz" Matsumoto
8f510be211
Merge branch 'method-missing-segfault' of https://github.com/bouk/mruby into bouk-method-missing-segfault
2016-12-03 18:20:29 +09:00
Yukihiro "Matz" Matsumoto
79a621dd73
Check before retrieving struct RRange pointer; fix #3320
...
range->edges may be NULL for example when #initialize_copy removed.
2016-12-03 12:30:01 +09:00
Yukihiro "Matz" Matsumoto
9776150263
Merge pull request #3317 from bouk/missing-to-s
...
Use mrb_ptr instead of mrb_cptr in Kernel#to_s
2016-12-03 12:01:43 +09:00
Yukihiro "Matz" Matsumoto
e673fbb35a
Merge pull request #3321 from clayton-shopify/fix-proc-crash-upstream
...
Fix segfault in mrb_proc_copy.
2016-12-03 11:54:22 +09:00
Clayton Smith
1ff4b3f800
Fix segfault in mrb_proc_copy.
2016-12-02 09:36:26 -05:00
Bouke van der Bijl
9c61e1cd87
Use mrb_ptr instead of mrb_cptr in Kernel#to_s
...
This is to avoid segfault when WORD_BOXING is enabled
Reported by https://hackerone.com/brakhane
2016-12-01 15:23:56 -05:00
Bouke van der Bijl
7d07466b43
Fix stack move segfaulting in OP_ARYCAT
...
Reported by https://hackerone.com/haquaman
Testcase (couldn't get it to work as a test):
def nil.b
b *nil
end
nil.b
2016-12-01 15:23:31 -05:00
Clayton Smith
2bc3a5fb78
Fix more integer overflows.
2016-12-01 09:08:38 -05:00
Yukihiro "Matz" Matsumoto
ab4ab7c8a0
Fix compile error by #3309
2016-12-01 18:37:03 +09:00
Clayton Smith
acdddb4f14
Prevent array size calculation overflows.
2016-11-30 13:55:09 -05:00
Yukihiro "Matz" Matsumoto
2bb47addad
Prohibit instantiation of immediate objects
2016-11-30 10:36:17 +09:00
Yukihiro "Matz" Matsumoto
f7c0024b8e
Merge pull request #3278 from bouk/dup-class
...
Copy over INSTANCE_TT when duping class
2016-11-30 03:52:56 +09:00
Yukihiro "Matz" Matsumoto
630733f346
check ttype before object allocation; fix #3294
2016-11-30 03:38:55 +09:00
Clayton Smith
b633aa9ad4
Use size_t to calculate bytes needed for array.
2016-11-29 10:26:02 -05:00
Yukihiro "Matz" Matsumoto
246a9a8acd
ary_concat: support self concatenation; fix #3302
2016-11-29 22:36:11 +09:00
Yukihiro "Matz" Matsumoto
9fc62d28d0
pre-allocate arena overflow error
2016-11-28 09:52:57 +09:00
Yukihiro "Matz" Matsumoto
36fc1f1431
Added Exception check in mrb_exc_set(); close #3292
...
PR #3293 just checks for NoMethodError.
2016-11-27 22:17:51 +09:00
Yukihiro "Matz" Matsumoto
d77b254108
Merge pull request #3287 from bouk/proc-arity
...
Fix calling .arity on Proc with undefined `initialize`
2016-11-25 09:20:47 +09:00
Yukihiro "Matz" Matsumoto
6905597f5b
Merge pull request #3284 from bouk/remove-method-segfault
...
Fix segfault on remove_method with invalid argument
2016-11-25 09:19:22 +09:00
Yukihiro "Matz" Matsumoto
a28fa35ea9
Merge pull request #3282 from bouk/fix-break-instance-class
...
Fix segfault when defining class inside instance_exec on primitive
2016-11-25 09:17:59 +09:00
Francois Chagnon
a384bcce35
Fix instances where return value of mrb_method_search_vm is unchecked
...
Reported by @charliesome
2016-11-24 10:51:29 -05:00
Clayton Smith
76a1bdfa29
Get String length after args in String#chomp!
...
Fixes RCE issue
Reported by @bouk
2016-11-24 10:28:21 -05:00
Francois Chagnon
1ec5994377
Fix calling .arity on Proc with undefined initialize
...
Reported by @bouk
2016-11-24 10:23:31 -05:00
Bouke van der Bijl
22f5504054
Fix segfault on remove_method with invalid argument
...
Reported by https://hackerone.com/jpenalbae
2016-11-24 10:13:47 -05:00
Bouke van der Bijl
4523aaec01
Fix segfault when defining class inside instance_exec on primitive
2016-11-24 10:06:15 -05:00
Bouke van der Bijl
73bb30c2f4
Copy over INSTANCE_TT when duping class
2016-11-24 09:52:30 -05:00
Yukihiro "Matz" Matsumoto
0c924b9287
fixed a bug in self modifying Array#[]=; fix #3274
2016-11-24 19:30:21 +09:00
Yukihiro "Matz" Matsumoto
cb5c9d3415
always call Hash#default if no key found; fix #3272
2016-11-24 18:09:04 +09:00
Yukihiro "Matz" Matsumoto
f5a86ca530
Add pointer casting from mrb_malloc(); ref #3267
2016-11-24 09:28:00 +09:00
Yukihiro "Matz" Matsumoto
798c69d1be
Avoid casting from int to unsigned char for C++; ref #3267
2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski
401ad4586f
Add constant export declaration for MRBC output compiled as C++
...
Otherwise, C++ compilers will skip this constant when producing object files.
2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski
1af9e363f2
Fixes for compiling mruby as C++
2016-11-24 09:28:00 +09:00
Yukihiro "Matz" Matsumoto
bfbc6b9ea4
local_variables() should not touch unshared env
2016-11-23 20:50:14 +09:00
Yukihiro "Matz" Matsumoto
efebbbbf26
Implement Float shift methods in C
2016-11-23 09:45:50 +09:00
Yukihiro "Matz" Matsumoto
8cba708854
int64_value(): use FIXABLE()
2016-11-22 19:11:54 +09:00
Yukihiro "Matz" Matsumoto
be73905c9c
accept floats as bit operator operands; fix #3260
2016-11-22 17:59:41 +09:00
Yukihiro "Matz" Matsumoto
8112295031
Removed fix_shift_get_width()
...
Fixnum is usually big enough for shift width.
2016-11-22 17:45:07 +09:00
Yukihiro "Matz" Matsumoto
740bf09740
add bit operators ~,&,|,^ to Float class (mruby special)
2016-11-22 17:36:26 +09:00
Yukihiro "Matz" Matsumoto
0ff3ae1fba
Range#include?: simplify condition; ref #3255
2016-11-18 11:54:24 +09:00
Yukihiro "Matz" Matsumoto
b03b1e37d9
Merge pull request #3255 from ksss/range-include
...
Fix condition of Range#include?
2016-11-18 11:48:49 +09:00
ksss
4ef591c897
Fix condition of Range#include?
2016-11-18 10:01:03 +09:00
Yukihiro "Matz" Matsumoto
57900d809f
String#include? does not take integers
2016-11-17 18:02:10 +09:00
Yukihiro "Matz" Matsumoto
8438792d27
renamed "inline" to "istruct" to represent inline struct; ref #3251
2016-11-17 17:19:49 +09:00
Tomasz Dąbrowski
4cca8bac6b
inline structures data type for mruby (MRB_TT_INLINE) ( fix #3237 )
...
Inline structures have no instance variables, no finalizer, and offer as much space as possible in RBASIC object. This means 24 bytes on 64-bit platforms and 12 bytes on 32-bit platforms.
mruby-inline-struct gem is only provided for testing.
2016-11-17 17:19:49 +09:00
Yukihiro "Matz" Matsumoto
c8b028027f
Merge pull request #3253 from ksss/range
...
Ranges should not rewrite
2016-11-17 16:44:58 +09:00