Control: forwarded -1 https://sourceware.org/bugzilla/show_bug.cgi?id=28380

On Tuesday, November 22 2022, Agathe Porte wrote:

> Dear Maintainer,
>
> When "poking" with the tutorial of GNU poke and its SBM image format,
> the program fails to write arrays of arrays into ios and fails:
>
>
>            _____
>        ---'   __\_______
>                   ______)  GNU poke 2.4
>                   __)
>                  __)
>        ---._______)
>
>       Copyright (C) 2019-2022 The poke authors.
>       License GPLv3+: GNU GPL version 3 or later.
>       This is free software: you are free to change and redistribute it.
>       There is NO WARRANTY, to the extent permitted by law.
>
>       Powered by Jitter 0.9.284.
>       Perpetrated by Jose E. Marchesi.
>
>       For help, type ".help".
>       Type ".exit" to leave the program.
>       (poke) .mem img
>       The current IOS is now `*img*'.
>       (poke) dump
>       76543210  0011 2233 4455 6677 8899 aabb ccdd eeff  0123456789ABCDEF
>       00000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       (poke) string @ 0#B = "SBM"
>       (poke) dump
>       76543210  0011 2233 4455 6677 8899 aabb ccdd eeff  0123456789ABCDEF
>       00000000: 5342 4d00 0000 0000 0000 0000 0000 0000  SBM.............
>       00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       (poke) byte @ 3#B = 5
>       (poke) byte @ 4#B = 7
>       (poke) dump
>       76543210  0011 2233 4455 6677 8899 aabb ccdd eeff  0123456789ABCDEF
>       00000000: 5342 4d05 0700 0000 0000 0000 0000 0000  SBM.............
>       00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       (poke) var c = [0xffUB,0x42UB,0x13UB]
>       (poke) var l = [c,c,c,c,c]
>       (poke) var i = [l,l,l,l,l,l,l]
>       (poke) byte[3][5][7] @ 5#B = i
>       (poke) dump
>       76543210  0011 2233 4455 6677 8899 aabb ccdd eeff  0123456789ABCDEF
>       00000000: 5342 4d05 0700 0000 0000 0000 0000 0000  SBM.............
>       00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000040: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       00000060: 0000 0000 0000 0000 0000 00ff 4213 0000  ............B...
>       00000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
>       (poke) c
>       [1]    11989 segmentation fault  poke
>
> As you can see, the memory is not correctly written, and attempting to
> print a value after attempting to write to the memory results in a
> SEGFAULT.
>
> I suspect that the error starts when the request to write the array of
> arrays is initiated, but does not result in the memory buffer being
> modified. I guess the interpreter is writing the content somewhere else
> than in the buffer.
>
> This issue was already reported upstream by another user in 2021:
> https://sourceware.org/bugzilla/show_bug.cgi?id=28380
>
> However I am not able to know if this bug is from upstream, or if the
> user that reported the upstream bug was also using the Debian package.
>
> If one can reproduce this error, eventually on another distro, we should
> notify upstream that the error is still happening.

Hello Agathe,

Thank you very much for taking the time to report this bug.

I see that in the meantime you have been able to reproduce it with git
HEAD from upstream and raised the topic in the poke mailing list.  Since
upstream has confirmed that they're aware of it, I'm marking this bug as
forwarded.

Cheers,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

Attachment: signature.asc
Description: PGP signature

Reply via email to