Comments (3)
Hi Alexey!
Thanks for your elaborate feedback. I will look at UZ.C to fix the
'double free' and to see if I can clean up some of the warnings. I
agree UZ.C isn't a happy piece of code, some of the mess is from
contributors sigh although I probably should have payed more attention
to it when that was done.
The rest of the repository is a little cleaner... I spent november and
part of december compiling the tool chain with four or five different
compilers including CLANG and cleaned up a lot of issues as you suggest
as possible :) A lot of it was fluff, but the compilations did
highlight some outright bugs as well. I didn't think to screen UZ.C
however...
David
Alexey Frunze wrote:
Cause: duplicated fclose(FFzipfile) in unzip().
Problem exists in 3 different files named uz.c.
Repro: compile uz.c for Windows with Smaller C then try to unzip a
small text file on Windows 7 x64. Sometimes it uz.exe would exit, but
sometimes it would hang after unzipping.What happens under the hood:
exit(), which runs after main(), calls fclose(stdout), which calls
free() to free stdout's buffer and ultimately kernel32::HeapFree()
hangs because of the memory corruption previously caused by a
double-free bug with 2 calls to fclose(FFzipfile).Side note: uz.c is horrible. It compiles with lots of warnings with gcc.
One of the things you may find in the warnings is this nice line of code:
| for (i ==0 ; i < len; i++)
|Note == instead of =.
I haven't tried anything else from the repository, but I think it
might be a good idea to clean up the code a little bit everywhere and
maybe try compiling it using different compilers to catch bad stuff.—
Reply to this email directly or view it on GitHub
#4.
from orangec.
I haven't reviewed all the changes, but src/uz/uz.c isn't hanging anymore. I guess, you could close the issue.
from orangec.
yeah i ran it through clang and restructured some code, should be a little better. Thanks again!
from orangec.
Related Issues (20)
- FR: please add the tools' purpose to their help output
- Remove Coff2IEEE HOT 1
- `occ -M` doesn't print anything to stdio
- Orange C failed to compile this project HOT 2
- IDE program not properly installed in new install of v67.3.1 on Windows 10 as current user HOT 3
- Should Orange C support `__attribute__((weak))`?
- Should Orange C support `__attribute__ ((visibility("default")))`?
- Does Orange C support `__declspec(thread)` or `__thread`?
- Update OCCIL to work with .NET Core? HOT 7
- Enhancement: A tool to convert normal C to the OCCIL dialect HOT 3
- Question: Is it possible to use native DLL with OCCIL? HOT 2
- OCL readme - cl386 leftovers? HOT 1
- Error: Undefined External 'WinMain' in module c0pe.nas HOT 4
- OCCIL: Fatal error: could not load lsmsilcrtl.dll HOT 3
- fix the 'read the docs' page HOT 1
- Make it possible to link DLL directly HOT 1
- Please update the CHM help files
- The layout on `read the docs` page is broken HOT 1
- The links on `read the docs` page is broken HOT 3
- Moving away from `read the docs` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orangec.