shc icon indicating copy to clipboard operation
shc copied to clipboard

Executable stops working

Open rkarato opened this issue 3 years ago • 4 comments

Hello, can you explain why the executable suddenly stops working and produces random characters?

This is the output of the executable that is failing user>./error_run_healthcheck_prak.x ./error_run_healthcheck_prak.x: ▒▒▒)▒▒▒+▒d▒꭭▒▒U2▒v▒▒b▒p▒

  ▒T▒▒g▒J▒;▒▒4▒f▒2!▒▒▒▒▒▒T▒2g▒▒▒$▒▒nvn▒s▒▒4▒▒▒i▒[t] ▒M▒▒?▒▒-▒Gv▒▒▒VQ▒f▒▒▒[▒d-▒oMh▒▒_▒t▒*m▒q▒▒8▒̎▒▒▒▒V▒/▒%▒▒!]▒K▒޽▒▒▒cq▒h3z▒▒k▒}▒▒7▒<?▒a)▒▒▒k▒RI▒▒f_Γ▒�▒

This is the output of the executable that is working hdfsuser@cdrl-hd-en4-~/covid19>./run_healthcheck_prak.x

Password:

The source script is the same, and at some point even the failing executable was working fine.

rkarato avatar Mar 12 '21 11:03 rkarato

I have the same issue you faced if you find ways to fix it. Can you post the solution here? Thanks in advance.

nghiaiosdev avatar Oct 05 '22 00:10 nghiaiosdev

Perhaps you fail to run because you are running the binary in different machine. Try to add -r in the command. -r Relax security. Make a redistributable binary

Example: shc -r -f script.sh -o script

mortylin2019 avatar Nov 04 '22 08:11 mortylin2019

Hi, I faced the same issue with v4.0.3. Does adding -r option resolve the issue? Any feedback please? Thanks-

mks75 avatar Feb 17 '23 20:02 mks75

I had the same problem on Arch linux.

Adding "-r" switch worked for me.

No idea why this works. The manual text talks about "relaxing security".

The "-r" switch seems to be an undocumented mandatory switch to get expected behaviour.

See my similar report here: https://github.com/neurobin/shc/issues/151#issuecomment-1670988795

james-h-dt avatar Aug 09 '23 09:08 james-h-dt