Yukihiro "Matz" Matsumoto
6e0ba0085d
Jump address should fit in 16 bits range; fix #3426
2017-02-04 12:37:08 +09:00
Yukihiro "Matz" Matsumoto
f0f095bc13
Fix a double free problem in codegen.c; fix #3378
...
This issue was first reported by https://hackerone.com/geeknik
The fix was proposed by @titanous
2017-01-23 16:53:31 +09:00
Yukihiro "Matz" Matsumoto
3ce82603a5
Fix memory leak; ref #3378
...
The fix was proposed by @titanous
2017-01-23 16:48:18 +09:00
Clayton Smith
797ff625f3
Fix incorrect parsing of block parameters.
2017-01-21 09:08:37 -05:00
Clayton Smith
2c0f8f1a23
Remove problematic optimization.
2017-01-20 18:40:18 -05:00
Yukihiro "Matz" Matsumoto
c2bbfa5b61
NODE_NEGATE cdr may not be code-node; fix #3348 ref #3324
...
Reported by Denis Kasak https://hackerone.com/dkasak
2016-12-18 02:02:30 +09:00
Yukihiro "Matz" Matsumoto
b0886d5692
Zero length heredoc still crashed; ref Shopify/mruby-internal#81
2016-12-18 02:02:30 +09:00
Yukihiro "Matz" Matsumoto
73cc08772f
remove debug code; ref #3344
2016-12-14 13:34:24 +09:00
Yukihiro "Matz" Matsumoto
fead715cef
tLABEL should not come after conditional ternary; fix #3344
2016-12-13 23:44:10 +09:00
Yukihiro "Matz" Matsumoto
d196e4dd04
void_expr_error(): n may be NULL.
...
Reported from @clayton-shopify.
2016-12-13 11:18:05 +09:00
Yukihiro "Matz" Matsumoto
647ad29a7a
Fixed wrong condition in new_sym() that breaks symbol data.
2016-12-13 02:33:28 +09:00
Yukihiro "Matz" Matsumoto
a4ae22ae0c
Failed to realloc irep->syms in certain condition.
...
Also msym size changed to 512 from 256.
2016-12-13 01:55:08 +09:00
Yukihiro "Matz" Matsumoto
13979a4376
Merge pull request #3324 from bouk/mruby/bouk-negate
...
Don't generate code for NODE_NEGATE if the result isn't used
Reported by https://hackerone.com/haquaman
2016-12-10 15:52:41 +09:00
Yukihiro "Matz" Matsumoto
7b968ca893
Clear parsing_heredoc at the end of file
2016-12-10 12:35:12 +09:00
Bouke van der Bijl
1264219832
Fix segfault in gen_values with NOVAL and more than 127 args
2016-12-09 10:30:05 -05:00
Bouke van der Bijl
c8da3c4df4
Fix segfault when undef is called with exactly 127 arguments
...
The issue is that when there are more than 126 arguments an array needs
to be created to pass the arguments on with.
Reported by https://hackerone.com/revskills
2016-12-08 15:47:17 -05:00
Tomasz Dąbrowski
0360a744b5
Promote load_exec to mruby API as mrb_load_exec ( fixes #3248 )
2016-12-07 21:21:21 +01:00
Bouke van der Bijl
d56a19cbf5
Don't generate code for NODE_NEGATE if the result isn't used
...
Reported by https://hackerone.com/haquaman
2016-12-07 15:14:17 -05:00
Yukihiro "Matz" Matsumoto
43512cc7bd
Reorganize heredoc rules; fix #3273
...
The following codes used to be SyntaxError:
(1)
a = <<-EOD;
hello
EOD
(2)
<<-EOD.bla begin
k
EOD
end
2016-12-05 02:55:39 +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
f6d199919d
Needed to apply block from safe-navigation operators; fix #3310
2016-12-03 16:38:43 +09:00
Yukihiro "Matz" Matsumoto
6b84ff4a44
Print NODE_SCALL (&.) from mrb_parser_dump()
2016-12-03 16:21:15 +09:00
Yukihiro "Matz" Matsumoto
c029c6c444
codegen: avoid unnecessary OP_MOVE after CASE
2016-12-03 14:50:36 +09:00
Bouke van der Bijl
fe362c1f26
Fix segfault when using result of rest assignment
...
Reported by https://hackerone.com/haquaman
2016-12-01 15:49:36 -05:00
Yukihiro "Matz" Matsumoto
2cca9d3688
avoid comparison between signed and unsigned integer; ref #3312
2016-12-01 18:49:39 +09:00
Nobuyoshi Nakada
0f08914ac0
Support multiple elements \u syntax
2016-12-01 16:48:43 +09:00
Nobuyoshi Nakada
fed40b44b8
Extract read_escape_unicode from read_escape
2016-12-01 16:48:43 +09:00
Yukihiro "Matz" Matsumoto
8461a31cb4
Fixed too much void_expr_error(); fix #3307
2016-11-30 13:04:50 +09:00
Bouke van der Bijl
523c267020
Interpret argument in 'f ()' as nil instead of nothing
2016-11-29 09:23:53 -05:00
Yukihiro "Matz" Matsumoto
27ceb84818
parse.y: use opt_paren_args to simplify yield rule
2016-11-27 22:43:46 +09:00
Yukihiro "Matz" Matsumoto
55842c5a34
resolve conflict; ref #3279
2016-11-25 09:33:20 +09:00
Yukihiro "Matz" Matsumoto
30f12ba4bc
resolve conflict; ref #3283
2016-11-25 09:27:24 +09:00
Yukihiro "Matz" Matsumoto
cc2786c84e
resolve conflict; ref #3285
2016-11-25 09:25:51 +09:00
Yukihiro "Matz" Matsumoto
0b4017fd69
resolve conflict; ref #3286
2016-11-25 09:23:47 +09:00
Francis Bogsanyi
964427f82c
Fix unsafe peephole optimization
...
Reported by https://hackerone.com/dkasak
2016-11-24 10:32:34 -05:00
Bouke van der Bijl
71641bbf73
Fix segfault caused by empty condition in ternary
...
Reported by https://hackerone.com/jpenalbae
2016-11-24 10:20:42 -05:00
Bouke van der Bijl
1253982577
Fix codegen issue causing misaligned register
...
Reported by https://hackerone.com/haquaman
2016-11-24 10:18:48 -05:00
Bouke van der Bijl
75b31d7438
Fix segfault on method call with exactly 127 arguments
...
Reported by https://hackerone.com/dkasak
2016-11-24 10:09:37 -05:00
Bouke van der Bijl
73e4f069be
Fix nested empty heredoc causing segfault
...
As reported by https://hackerone.com/jpenalbae
2016-11-24 09:54:18 -05:00
Yukihiro "Matz" Matsumoto
22f73250db
redo should work well in for statement; fix #3275
2016-11-24 21:25:27 +09:00
Yukihiro "Matz" Matsumoto
227daa8811
Relax 'void value expression' check that was too strict
2016-11-24 11:22:54 +09:00
Yukihiro "Matz" Matsumoto
1c9593954b
Add "void value expression" check to the parser.
2016-11-24 10:32:28 +09:00
Yukihiro "Matz" Matsumoto
dc4be19aab
Add forgotten loop_pop() in NODE_OP_ASGN codegen
2016-11-24 10:01:03 +09:00
Yukihiro "Matz" Matsumoto
669bbc70b0
codegen_scope should not keep old iseq ptr from irep
2016-11-23 21:08:35 +09:00
Yukihiro "Matz" Matsumoto
752ca514f6
do not dump_node if parser failed
2016-11-11 22:51:48 +09:00
Yukihiro "Matz" Matsumoto
185dad3a6e
node_dump() to print NODE_HEREDOC terminator
2016-11-11 22:50:41 +09:00
Yukihiro "Matz" Matsumoto
45aadd7e60
HEREDOC could fail with NUL terminated lines; fix#3244
2016-11-11 22:49:23 +09:00
Yukihiro "Matz" Matsumoto
3f002b6993
fixed a bug when number of LHS and RHS differs; fix #3239
2016-11-11 04:37:42 +09:00
Yukihiro "Matz" Matsumoto
1142cf2037
fixed a bug with [] in RHS of multiple assignments; fix #3236
2016-11-08 22:18:41 +09:00
Yukihiro "Matz" Matsumoto
cc3f1b7f5c
allow single quoted labels in hashes; ref #3231
2016-11-02 16:14:20 +09:00