ZSNES won't run on glibc 2.4 -- includes patch -- repost

Found a bug? Please report it, but remember to follow the bug reporting guidelines.
Missing a sane feature? Let us know!
But please do NOT request ports to other systems.

Moderator: ZSNES Mods

Post Reply
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

ZSNES won't run on glibc 2.4 -- includes patch -- repost

Post by pagefault »

The original thread was deleted. Here is the contents
podfish wrote: Please see http://bugs.gentoo.org/show_bug.cgi?id=125861 for a more lucid description.

In a nutshell, a minor memory allocation bug overlooked by glibc-2.3.x is caught by glibc-2.4. see patch below, or here for the diff file.
Code:

diff -NurdB zsnes_1_42/src/linux/zfilew.c zsnes_1_42-patched/src/linux/zfilew.c
--- zsnes_1_42/src/linux/zfilew.c 2005-01-14 08:11:19.000000000 -0500
+++ zsnes_1_42-patched/src/linux/zfilew.c 2006-03-16 02:16:42.000000000 -0500
@@ -476,9 +476,13 @@
{
homedir = (char *)malloc(ZCFG_DIR_LEN);
getcwd(homedir, ZCFG_DIR_LEN);
+ strcpy(zcfgdir, homedir);
+ free(homedir);
+ }
+ else
+ {
+ strcpy(zcfgdir, homedir);
}
- strcpy(zcfgdir, homedir);
- free(homedir);
strcat(zcfgdir, ZCFG_DIR);
tmp = opendir(zcfgdir);
if (tmp == NULL)


I can't be credited for this--Leonardo Boshell of Gentoo.org found this badboy. it hasn't been heavily tested.

Thanks!

The Podfish
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

This patch is irrelevant.

We had this bug as well as others with the code fixed months ago.
Use CVS.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
podfish

Post by podfish »

Great, thanks. If so many bugs have been fixed, maybe a minor release would be appropriate? CVS is cool, but it's too fluid for some folks systems.
Spike
Rookie
Posts: 21
Joined: Mon Oct 10, 2005 12:02 pm

Post by Spike »

No idea, I have a hard time believing that "too fluid" argument when it comes to you gentoo users.

Windows has WIP builds, due to so many people not wanting to compile zsnes themselves.

We have a compiler and an assembler, and CVS, and its incredibly easy to do it yourself.

I think the point is moot.

As zsnes is only a single bin and manpage, shoving it in local/bin isn't gonna hurt you too bad i'm sure.
podfish

Post by podfish »

I said some people's not mine. I don't mind at all. I'm not the brightest out there, but I'm sure I can figure it out. However, I would think that a major bug like that would be cause for new release. Not to second guess you folks though, you're obviously doing a fine job. Might even break out the checkbook for a donation, considering the use I get out of this badboy.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

podfish wrote:However, I would think that a major bug like that would be cause for new release.
We're not ready to release. Although I would like to be ready to release ASAP.

BTW, I did make a minor release... Sort of... http://nsrt.edgeemu.com/forum/viewtopic.php?t=448
I don't recall what's in that one.

Beware the power of the fish!
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Post Reply