-
Notifications
You must be signed in to change notification settings - Fork 65
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
Crash with -f sixels
#210
Comments
Thanks for reporting this. I can't repro so far, and ASAN/Valgrind are coming up empty-handed. Could you please specify:
|
Oh that's interesting...
Here is a minidump without heap: I'm working on finding a good way to upload a dump with heap, but it's 26 MB when compressed with zip deflate level 9, and GitHub only allows <= 25 MB. |
Rar compresses it to 19 MB, but GitHub doesn't accept So, here is a To extract it, download it and rename it to |
You may want to double check that the test image you pasted here actually matches your local copy. I think it's quite possible that github recompresses images that it hosts, and if that's the case, the github version wouldn't necessarily reproduce the crash that you're seeing on your local copy. |
When I right-click on the image and download it, it comes down byte for byte identical to the source image. And I'm able to repro the crash when using the downloaded copy. The two dump files I uploaded should be useful in debugging, without needing a local repro. |
Thanks, that helped a lot. I was able to take a peek with WinDbg and confirmed it's crashing on a Since I'm cross-compiling with gcc, I don't have a PDB, so no backtrace yet -- but there aren't too many candidates to check manually. |
Anything further I can do to help? I'm also happy to test a pre-release prototype fix. |
Can't think of anything right now, but might take you up on the testing offer once I have something running here. |
Is it a case of gcc bug 15795? |
I doubt it -- the code I'm suspicious of is just plain C, and heap allocations are aligned manually to 64 bytes. It's most likely just doing The asm looks familiar and could match in a couple of places. I just have to narrow it down. |
Figured it out. It's actually gcc bug 54412. We have code that looks like this: __m256i func_b (void) {
__m256i v;
...
return v;
}
void func_a (void) {
__m256i u;
u = func_b ();
...
}
void func_b (__m256i *o) {
__m256i v;
...
*o = v;
}
void func_a (void) {
__m256i u;
func_b (&u);
...
} I'm attaching a test binary wrapped in a zip file. It works for me -- @chrisant996, care to test? |
That doesn't seem related to the crash. Have you considered opening a separate issue? That's probably better than appending to an unrelated issue. |
Thanks @veltza -- I think it's a real issue, but I suspect it's not a Chafa bug, but rather the terminal misreporting its pixel dimensions. Please open a new issue so we can investigate :-) |
Sure, I'll do that. I apologize for disturbing you here. |
Thanks for testing! |
Workaround for GCC bug #54412: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412 GCC does not enforce 32-byte alignment for return values placed on the stack in 64-bit MS Windows builds, yet it emits vmovdqa instructions that require alignment. This would cause crashes when resampling big images. Fixes #210 (GitHub).
Repro steps:
chafa -f sixels "911 Row - redacted.jpg"
I'm able to reproduce crashes with
-f sixels
on many different input.jpg
files, but also many other input.jpg
files do not crash.The input photo:
The text was updated successfully, but these errors were encountered: