Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Win32 nightly builds now using mingw
Re: Win32 nightly builds now using mingw [message #46497 is a reply to message #46278] Mon, 16 May 2016 13:27 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1427
Registered: September 2007
Ultimate Contributor
cbpporter wrote on Thu, 07 April 2016 11:25
Nice!

I've been trying to integrate more and more GCC in my stuff, but it is not that easy.

This is not related to U++, but me doing funky stuff on program terminate, but often with GCC I have a weird problem: the program crashes on the atexit stage, where I do a pre-global destructor cleanup. And the weird part is that this only happens on a fresh compile after a clean. I compile in optimized mode, crashes. Recompile without optimal mode, no crash. After this, no mater how many times I compile in optimized mode, no more crash and the problem goes away for hours or until I shut down everything and clean the build folder.

This happens on Windows only, and anyway I can't Valgrind, since it is in optimized mode.

But without the cleanup, GCC looks like it works well and I try to compile once a week.

There are two problems here.

First, a TheIDE related linking error. If you change the build method from MSC it can happen.

But sometimes it persisted no matter what.

But I finally found something: removing a single inline from a function fixed this. It appears that maybe TDM has some problems with too aggressive inline-ing. The following code crashes:

inline void _free(void** p) {
	if (*p) {
		STDLIB_GC--;
		free(*p);
	}
	*p = 0;
}


Do you guys see anything wrong with this code? It crashes when freeing some members from global variables.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TheIDE - Python syntax and indention support
Next Topic: Core: New String methods
Goto Forum:
  


Current Time: Sun Jun 29 08:02:38 CEST 2025

Total time taken to generate the page: 0.03569 seconds