Discussion:
Bug#861180: shc: infinite loop does not work properly
(too old to reply)
Tong Sun
2017-04-25 13:50:01 UTC
Permalink
Hi Eriberto,

Is your infinite loop problem exactly as described in
https://sfxpt.wordpress.com/2014/02/23/shc-3-8-9-is-not-usable/ ?



On Tue, Apr 25, 2017 at 9:24 AM, Joao Eriberto Mota Filho <
Package: shc
Version: 3.8.9b-1+b1
Severity: grave
Tags: upstream stretch
Justification: renders package unusable
Dear Maintainer,
The shc command is generating executables which can not be used over
Stretch and Sid. After generate the executable, when running, the
program.sh.x enter in an infinite loop, without a result for user.
The Ctrl-C is needed to stop the execution.
The command '# strace ./program.sh.x' shows the infinite loop.
Shc is working properly in Jessie.
I can see other references about the problem in some foruns[1][2][3].
[1] https://github.com/neurobin/shc/issues/23
[2] https://askubuntu.com/questions/899603/shc-maked-
binary-cannot-be-execute
[3] http://www.1oo.club/shc-maked-binary-cannot-be-execute/
Regards,
Eriberto
Debian Release: 9.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64
(x86_64)
Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
ii libc6 2.24-9
shc recommends no packages.
shc suggests no packages.
-- no debconf information
Eriberto Mota
2017-04-25 14:30:02 UTC
Permalink
Post by Tong Sun
Hi Eriberto,
Is your infinite loop problem exactly as described in
https://sfxpt.wordpress.com/2014/02/23/shc-3-8-9-is-not-usable/ ?
Hi Tong! Thanks for your quick reply.

No, not embedded here. See the following step-by-step:

1. The script test.sh:

#!/bin/bash

echo ok
exit 0

2. The compilation (Debian Stretch, kernel 4.9.0-2-amd64, gcc6.3.0 20170406):

$ shc -f test.sh

3. Execution:

$ ./test.sh.x


----> == no reply.

4. The loop:

$ strace ./test.sh.x

Thanks!

Eriberto
Tong Sun
2017-04-25 16:20:01 UTC
Permalink
Thanks for the detailed steps Eriberto, forwarding to the upstream author.

Francisco, could you take a look at it please?

Thanks
Post by Eriberto Mota
Post by Tong Sun
Hi Eriberto,
Is your infinite loop problem exactly as described in
https://sfxpt.wordpress.com/2014/02/23/shc-3-8-9-is-not-usable/ ?
Hi Tong! Thanks for your quick reply.
#!/bin/bash
echo ok
exit 0
$ shc -f test.sh
$ ./test.sh.x
----> == no reply.
$ strace ./test.sh.x
Thanks!
Eriberto
Eriberto
2017-04-25 16:30:01 UTC
Permalink
Post by Tong Sun
Thanks for the detailed steps Eriberto, forwarding to the upstream author.
Francisco, could you take a look at it please?
Thanks
This bug could be solved soon to avoid shc be excluded from next
Debian Stable. I can sponsor the package if you want.

Thanks in advance.

Regards,

Eriberto
Tong Sun
2017-04-25 16:40:01 UTC
Permalink
Thanks Eriberto for the offer.
I don't know how fast Francisco can response. Javier, could you see if you
can do anything? Thanks.
Post by Tong Sun
Post by Tong Sun
Thanks for the detailed steps Eriberto, forwarding to the upstream
author.
Post by Tong Sun
Francisco, could you take a look at it please?
Thanks
This bug could be solved soon to avoid shc be excluded from next
Debian Stable. I can sponsor the package if you want.
Thanks in advance.
Regards,
Eriberto
Tong Sun
2017-04-30 20:00:02 UTC
Permalink
I did some tests and I have news. I downloaded the versions 3.8.6 and
3.8.7 from upstream homepage and I did a 'make' inside a Sid jail.
After this, I compiled a shell script. The script compiled by 3.8.6
version worked fine, but the script from 3.8.7 (and newer) fails
(infinite loop).
Oh, that's indeed a good news.

There are two major fixes after versions 3.8.6

- Bug on 64bit systems with expiration dates.
- Fixing a long standing bug making the source not hidden.

Both are big issues, and I vaguely remember that expiration date was an
issue biting me. I think we need to do more testing before making any
decision.

Also, CCing *Giacomo Picconi* to see if he has any ideas about the bug and
fix.

Thanks

Loading...