Skip to content
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

"Invalid free()" when passing the output of one Proc to the input of another #5640

Open
p6rt opened this issue Sep 4, 2016 · 3 comments
Open
Labels

Comments

@p6rt
Copy link

@p6rt p6rt commented Sep 4, 2016

Migrated from rt.perl.org#129197 (status was 'open')

Searchable as RT129197$

@p6rt
Copy link
Author

@p6rt p6rt commented Sep 4, 2016

From @MasterDuke17

When running the below code, using a moar built with --debug
valgrind --trace-children=yes ~/Source/perl6/install/bin/perl6 -e 'for ^1000 { my $proc = run(​:out, :bin, ‘tar’, ‘cf’, ‘-’, ‘--absolute-names’, ‘--’, "417d97ddcffcb4404aba396509bd06d0cf81f013-texas"); say "$_​: created tar"; run(​:in($proc.out), :bin, ‘lzop’, ‘-f’, ‘-q’, "-o", "4-texas.lzop"); say "$_​: ran lzop"; }'

==29941== Invalid free() / delete / delete[] / realloc()
==29941== at 0x4C2AD90​: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29941== by 0x4FC6C43​: MVM_free (alloc.h​:29)
==29941== by 0x4FC6C43​: do_close (syncpipe.c​:37)
==29941== by 0x4FC6C43​: closefh (syncpipe.c​:52)
==29941== by 0x4FC388A​: MVM_io_close (io.c​:28)
==29941== by 0x4F8F2E0​: MVM_interp_run (interp.c​:4361)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941== Address 0xffefffd40 is on thread 1's stack
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FB7B58​: MVM_intcache_get (intcache.c​:40)
==29941== by 0x4F85C65​: MVM_args_slurpy_positional (args.c​:574)
==29941== by 0x4F9B6DB​: MVM_interp_run (interp.c​:1046)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FEB3C0​: set_int (P6bigint.c​:73)
==29941== by 0x4F85E31​: MVM_args_slurpy_positional (args.c​:574)
==29941== by 0x4F9B6DB​: MVM_interp_run (interp.c​:1046)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FB7B58​: MVM_intcache_get (intcache.c​:40)
==29941== by 0x4F842C8​: MVM_args_get_pos_obj (args.c​:297)
==29941== by 0x4F913C3​: MVM_interp_run (interp.c​:917)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FEB3C0​: set_int (P6bigint.c​:73)
==29941== by 0x4F8434C​: MVM_args_get_pos_obj (args.c​:297)
==29941== by 0x4F913C3​: MVM_interp_run (interp.c​:917)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x5048E0C​: MVM_bigint_cmp (bigintops.c​:479)
==29941== by 0x4F94259​: MVM_interp_run (interp.c​:3275)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4F94EDE​: MVM_interp_run (interp.c​:2858)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Use of uninitialised value of size 8
==29941== at 0x4F94EE4​: MVM_interp_run (interp.c​:2858)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Use of uninitialised value of size 8
==29941== at 0x4F94EEE​: MVM_interp_run (interp.c​:2858)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FAEA0A​: MVM_is_null (MVMNull.h​:11)
==29941== by 0x4FAEA0A​: MVM_coerce_istrue (coerce.c​:31)
==29941== by 0x4F9BCF0​: MVM_interp_run (interp.c​:242)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FAEA1D​: MVM_is_null (MVMNull.h​:11)
==29941== by 0x4FAEA1D​: MVM_coerce_istrue (coerce.c​:31)
==29941== by 0x4F9BCF0​: MVM_interp_run (interp.c​:242)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Use of uninitialised value of size 8
==29941== at 0x4FAEA1F​: MVM_coerce_istrue (coerce.c​:32)
==29941== by 0x4F9BCF0​: MVM_interp_run (interp.c​:242)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Use of uninitialised value of size 8
==29941== at 0x4FAEBB2​: MVM_coerce_istrue (coerce.c​:65)
==29941== by 0x4F9BCF0​: MVM_interp_run (interp.c​:242)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Use of uninitialised value of size 8
==29941== at 0x4FDFAE0​: MVM_p6opaque_real_data (P6opaque.h​:108)
==29941== by 0x4FDFAE0​: get_int (P6opaque.c​:452)
==29941== by 0x4FAEBD5​: MVM_coerce_istrue (coerce.c​:65)
==29941== by 0x4F9BCF0​: MVM_interp_run (interp.c​:242)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Jun 24, 2018

From @dogbert17

On Sun, 04 Sep 2016 11​:35​:06 -0700, ddgreen@​gmail.com wrote​:

When running the below code, using a moar built with --debug
valgrind --trace-children=yes ~/Source/perl6/install/bin/perl6 -e 'for
^1000 { my $proc = run(​:out, :bin, ‘tar’, ‘cf’, ‘-’, ‘--absolute-
names’, ‘--’, "417d97ddcffcb4404aba396509bd06d0cf81f013-texas"); say
"$_​: created tar"; run(​:in($proc.out), :bin, ‘lzop’, ‘-f’, ‘-q’, "-o",
"4-texas.lzop"); say "$_​: ran lzop"; }'

==29941== Invalid free() / delete / delete[] / realloc()
==29941== at 0x4C2AD90​: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29941== by 0x4FC6C43​: MVM_free (alloc.h​:29)
==29941== by 0x4FC6C43​: do_close (syncpipe.c​:37)
==29941== by 0x4FC6C43​: closefh (syncpipe.c​:52)
==29941== by 0x4FC388A​: MVM_io_close (io.c​:28)
==29941== by 0x4F8F2E0​: MVM_interp_run (interp.c​:4361)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941== Address 0xffefffd40 is on thread 1's stack
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FB7B58​: MVM_intcache_get (intcache.c​:40)
==29941== by 0x4F85C65​: MVM_args_slurpy_positional (args.c​:574)
==29941== by 0x4F9B6DB​: MVM_interp_run (interp.c​:1046)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FEB3C0​: set_int (P6bigint.c​:73)
==29941== by 0x4F85E31​: MVM_args_slurpy_positional (args.c​:574)
==29941== by 0x4F9B6DB​: MVM_interp_run (interp.c​:1046)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FB7B58​: MVM_intcache_get (intcache.c​:40)
==29941== by 0x4F842C8​: MVM_args_get_pos_obj (args.c​:297)
==29941== by 0x4F913C3​: MVM_interp_run (interp.c​:917)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FEB3C0​: set_int (P6bigint.c​:73)
==29941== by 0x4F8434C​: MVM_args_get_pos_obj (args.c​:297)
==29941== by 0x4F913C3​: MVM_interp_run (interp.c​:917)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x5048E0C​: MVM_bigint_cmp (bigintops.c​:479)
==29941== by 0x4F94259​: MVM_interp_run (interp.c​:3275)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4F94EDE​: MVM_interp_run (interp.c​:2858)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Use of uninitialised value of size 8
==29941== at 0x4F94EE4​: MVM_interp_run (interp.c​:2858)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Use of uninitialised value of size 8
==29941== at 0x4F94EEE​: MVM_interp_run (interp.c​:2858)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FAEA0A​: MVM_is_null (MVMNull.h​:11)
==29941== by 0x4FAEA0A​: MVM_coerce_istrue (coerce.c​:31)
==29941== by 0x4F9BCF0​: MVM_interp_run (interp.c​:242)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Conditional jump or move depends on uninitialised value(s)
==29941== at 0x4FAEA1D​: MVM_is_null (MVMNull.h​:11)
==29941== by 0x4FAEA1D​: MVM_coerce_istrue (coerce.c​:31)
==29941== by 0x4F9BCF0​: MVM_interp_run (interp.c​:242)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Use of uninitialised value of size 8
==29941== at 0x4FAEA1F​: MVM_coerce_istrue (coerce.c​:32)
==29941== by 0x4F9BCF0​: MVM_interp_run (interp.c​:242)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Use of uninitialised value of size 8
==29941== at 0x4FAEBB2​: MVM_coerce_istrue (coerce.c​:65)
==29941== by 0x4F9BCF0​: MVM_interp_run (interp.c​:242)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)
==29941==
==29941== Use of uninitialised value of size 8
==29941== at 0x4FDFAE0​: MVM_p6opaque_real_data (P6opaque.h​:108)
==29941== by 0x4FDFAE0​: get_int (P6opaque.c​:452)
==29941== by 0x4FAEBD5​: MVM_coerce_istrue (coerce.c​:65)
==29941== by 0x4F9BCF0​: MVM_interp_run (interp.c​:242)
==29941== by 0x50526F8​: MVM_vm_run_file (moar.c​:304)
==29941== by 0x400ED3​: main (main.c​:191)

I'm unable to reproduce this with​:

$ ./perl6 -v
This is Rakudo version 2018.06-25-ge9351cb built on MoarVM version 2018.06-3-ga75090c
implementing Perl 6.c.

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Jun 24, 2018

The RT System itself - Status changed from 'new' to 'open'

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant