Skip to content
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

Invalid free in pool_free (pool.c:120) #40

Closed
mvidner opened this issue Dec 10, 2013 · 6 comments
Closed

Invalid free in pool_free (pool.c:120) #40

mvidner opened this issue Dec 10, 2013 · 6 comments

Comments

@mvidner
Copy link
Member

mvidner commented Dec 10, 2013

While investigating a yast crash on openSUSE 13.1, valgrind points me to the line solv_free(pool->languages); in pool_free. It seems to me that if nlanguages == 0 then that pointer is uninitialized. I base that on pool_set_languages skipping it.

Workaround: export LANG=en_US.UTF-8 (it was empty in my JeoS before)

@mlschroe
Copy link
Member

It can't be uninitialized, the pool is zero-filled in pool_create(). It seems like it gets freed twice when set_languages reduces the number of languages to zero. Will fix...

@mlschroe
Copy link
Member

fixed with commit #d66d76b

I don't understand why the number of languages gets reduced, can you verify in the YaST log that this is the case? libzypp logs a "pool_set_languages" line for each call to pool_set_languages...

@mvidner
Copy link
Member Author

mvidner commented Dec 10, 2013

http://pastebin.suse.de/8541 (internal pastebin :-/ , where else can I upload a log?) has 2 yast runs, 1st without LANG, 2nd with en_US.UTF8, both are a smoke test of the ncurses packaging widget and reinstall aaa_base-extras

@mvidner
Copy link
Member Author

mvidner commented Dec 10, 2013

@mlschroe ping because of the log, I'm not sure whether you get notifications on closed issues

@mlschroe
Copy link
Member

The one without LANG contains two calls:

PoolImpl.cc(setTextLocale):420 pool_set_languages: (en)
PoolImpl.cc(setTextLocale):420 pool_set_languages: ()

So it seems like my analysis is correct.

@mlschroe
Copy link
Member

Ok, Michael Andres and me searched the code a bit.

libyui's YApplication::language() function uses "" as default, whereas libzypp's _autodetectTextLocale() uses "en" as default. Thus the difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants