linux-msm / qdl

BSD 3-Clause "New" or "Revised" License
225 stars 79 forks source link

Sparse image format + Some fixes #5

Open abozhinov444 opened 5 years ago

blenk92 commented 5 years ago

I tried this implementation (with valgrind) and I'm seeing this:

==29674== Invalid read of size 8
==29674==    at 0x483F71C: memmove (vg_replace_strmem.c:1271)
==29674==    by 0x10B92C: firehose_program_sparse (firehose.c:330)
==29674==    by 0x10E5FF: callback_stream_skip (output_stream.c:113)
==29674==    by 0x10E38A: write_all_blocks (sparse.c:110)
==29674==    by 0x10E4DC: sparse_stream_callback (sparse.c:141)
==29674==    by 0x10BD2E: firehose_program (firehose.c:444)
==29674==    by 0x10D37E: program_execute (program.c:136)
==29674==    by 0x10C0F2: firehose_run (firehose.c:698)
==29674==    by 0x10AAC8: main (qdl.c:517)
==29674==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==29674== 
==29674== 
==29674== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==29674==  Access not within mapped region at address 0x0
==29674==    at 0x483F71C: memmove (vg_replace_strmem.c:1271)
==29674==    by 0x10B92C: firehose_program_sparse (firehose.c:330)
==29674==    by 0x10E5FF: callback_stream_skip (output_stream.c:113)
==29674==    by 0x10E38A: write_all_blocks (sparse.c:110)
==29674==    by 0x10E4DC: sparse_stream_callback (sparse.c:141)
==29674==    by 0x10BD2E: firehose_program (firehose.c:444)
==29674==    by 0x10D37E: program_execute (program.c:136)
==29674==    by 0x10C0F2: firehose_run (firehose.c:698)
==29674==    by 0x10AAC8: main (qdl.c:517)
==29674==  If you believe this happened as a result of a stack
==29674==  overflow in your program's main thread (unlikely but
==29674==  possible), you can try to increase the size of the
==29674==  main thread stack using the --main-stacksize= flag.
==29674==  The main thread stack size used in this run was 8388608.
==29674== 
...
abozhinov444 commented 5 years ago

I tried this implementation (with valgrind) and I'm seeing this:

==29674== Invalid read of size 8
==29674==    at 0x483F71C: memmove (vg_replace_strmem.c:1271)
==29674==    by 0x10B92C: firehose_program_sparse (firehose.c:330)
==29674==    by 0x10E5FF: callback_stream_skip (output_stream.c:113)
==29674==    by 0x10E38A: write_all_blocks (sparse.c:110)
==29674==    by 0x10E4DC: sparse_stream_callback (sparse.c:141)
==29674==    by 0x10BD2E: firehose_program (firehose.c:444)
==29674==    by 0x10D37E: program_execute (program.c:136)
==29674==    by 0x10C0F2: firehose_run (firehose.c:698)
==29674==    by 0x10AAC8: main (qdl.c:517)
==29674==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==29674== 
==29674== 
==29674== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==29674==  Access not within mapped region at address 0x0
==29674==    at 0x483F71C: memmove (vg_replace_strmem.c:1271)
==29674==    by 0x10B92C: firehose_program_sparse (firehose.c:330)
==29674==    by 0x10E5FF: callback_stream_skip (output_stream.c:113)
==29674==    by 0x10E38A: write_all_blocks (sparse.c:110)
==29674==    by 0x10E4DC: sparse_stream_callback (sparse.c:141)
==29674==    by 0x10BD2E: firehose_program (firehose.c:444)
==29674==    by 0x10D37E: program_execute (program.c:136)
==29674==    by 0x10C0F2: firehose_run (firehose.c:698)
==29674==    by 0x10AAC8: main (qdl.c:517)
==29674==  If you believe this happened as a result of a stack
==29674==  overflow in your program's main thread (unlikely but
==29674==  possible), you can try to increase the size of the
==29674==  main thread stack using the --main-stacksize= flag.
==29674==  The main thread stack size used in this run was 8388608.
==29674== 
...

I am splitting patches, now due to latest review and will address this issue.

abozhinov444 commented 5 years ago

Hi Bjorn, i have split all the patches. Also base source is there. Now it is much better. Also i have fixed mentioned above issue.

Regards, Atanas

blenk92 commented 5 years ago

Hi Bjorn, i have split all the patches. Also base source is there. Now it is much better. Also i have fixed mentioned above issue.

Regards, Atanas

Tried it, seems to work for me now ;-)

abozhinov444 commented 5 years ago

Thank you, for the feedback.

obbardc commented 2 years ago

@abozhinov444 Do you have a chance to rebase onto HEAD ?

jwinarske commented 1 year ago

Is this PR getting merged? What's the status?