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
SEGV on 16-bit-sized arg insertion #4602
Comments
From @TimToady09:24 < TimToady> m: say 1, |(2 xx 65534) |
From @MARTIMMOn 09/28/2015 06:52 PM, Larry Wall (via RT) wrote:
|
The RT System itself - Status changed from 'new' to 'open' |
From @FROGGSThe might be either this: Inline Patchdiff --git a/src/core/args.c b/src/core/args.c
index c4f2696..4772034 100644
--- a/src/core/args.c
+++ b/src/core/args.c
@@ -677,7 +677,7 @@ MVMObject * MVM_args_slurpy_named(MVMThreadContext *tc, MVMArgProcContext *ctx)
static void flatten_args(MVMThreadContext *tc, MVMArgProcContext *ctx) {
MVMArgInfo arg_info;
- MVMuint16 flag_pos = 0, arg_pos = 0, new_arg_pos = 0,
+ MVMuint32 flag_pos = 0, arg_pos = 0, new_arg_pos = 0,
new_arg_flags_size = ctx->arg_count > 0x7FFF ? ctx->arg_count : ctx->arg_count * 2,
new_args_size = new_arg_flags_size, i, new_flag_pos = 0, new_num_pos = 0;
MVMCallsiteEntry *new_arg_flags;
Inline Patchdiff --git a/src/core/args.c b/src/core/args.c
index c4f2696..43a966a 100644
--- a/src/core/args.c
+++ b/src/core/args.c
@@ -702,7 +702,7 @@ static void flatten_args(MVMThreadContext *tc, MVMArgProcContext *ctx) {
MVMint64 count = REPR(list)->elems(tc, STABLE(list), list, OBJECT_BODY(list));
MVMStorageSpec lss = REPR(list)->pos_funcs.get_elem_storage_spec(tc, STABLE(list));
- if ((MVMint64)new_arg_pos + count > 0xFFFF) {
+ if ((MVMint64)new_arg_pos + count > 0xC000) {
MVM_exception_throw_adhoc(tc, "Too many arguments in flattening array.");
}
|
From @jnthnOn Tue Sep 29 01:40:18 2015, mt1957@gmail.com wrote:
Seems I unknowingly fixed this while fixing named arg flattening issues some weeks back. I've added tests to cover it in S06-signature/slurpy-and-interpolation.t to make sure we don't regress on it. |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#126212 (status was 'resolved')
Searchable as RT126212$
The text was updated successfully, but these errors were encountered: