This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc, mplayer and profile (mcount)



Hello folks,


This is my last post on the subject of mcount.

	I have spent a quite bit of time on this to find out
	that the results of myserious crashes is the mcount variable.
	(with help from Ian Lance Taylor).

	I have reported the issue to both gcc and mplayer lists, and
	from _BOTH_ lists I got reply that they do not feel it is their
	problem and blamed the other package.

	WELL, as far as I'm concerned the issue is solved, I know how to
	fix it and works for me.

	In spirit making OSS better, I took the extra effor to report
	findings back to both lists. In reward I got flamed on both list.

The Issue:

	Anyway, the scop is that once I try to compile mplayer with
	-pg option (or -p) then it will start myseriously crash on
	mplayer/libmenu/menu.c:menu_init().

	It comes out that  in mplayer/libmenu/menu.c there's in use
	"mcount" variable:

		# grep mcount menu.c
		static int mcount = 0;

	however, once "-pg" or "-p" options are enabled,
	gcc uses mcount _function_ for its internal profiling.

The results are mysterious crashes on menu_init().

Suggested solutions:

* Rename mcount in mplayer/libmenu/menu.c to something else.

* document mcount in gcc man page

* gcc prints warning.

* do nothing.

I can immagine that gcc developers might have intentionally left mcount() visible to user space so that user can replace gcc's mcount() with their own implementation.

Just FWIW, I don't care if anything will get done about it.

--
Adam Sulmicki
http://www.eax.com 	The Supreme Headquarters of the 32 bit registers


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]