[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX'
From: |
Dimitur Kirov |
Subject: |
Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope |
Date: |
Fri, 21 Aug 2009 22:37:47 +0300 |
> >
> > Ако съжденията ти са верни, то кръпката за PA е недъгава (както и
> > много други подобни). Нали така?
> да, но с една условност:
>
> xpcomPath = g_malloc(x);
> some_function (xpcomPath);
> strlen (xpcomPath)
>
> ако знаем, че 'some_function' не винаги променя xpcomPath, или още
> по-точно - не винаги записва \0 в него, то тогава това е bug.
>
> Ако сме сигурни, че some_function винаги записва \0 в xpcomPath, то
> тогава не е bug.
В частност:
в твоята кръпка some_function е GRE_GetGREPathWithProperties
Тя не винаги променя xpcomPath, но тогава връща резултат грешка. Затова
предложих вариант в който се проверява резултата от тази функция, преди
да се вика strlen
в кръпката за pulseaudio:
some_function е pa_get_home_dir
1. ползват собствен алокатор pa_xmalloc, за който не се знае дали сам
не слага \0. Тогава не би било bug
2. правят проверка на резултата от извикването на some_function, преди
да извикат strlen
if (!pa_get_home_dir(homedir, allocated)) {
Ако предположим, че pa_get_home_dir връща ИСТИНА единствено ако е
променила homedir (и сложила \0 накрая), то тогава това не е bug
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, (continued)
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope,
Dimitur Kirov <=
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/21
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/22
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/22
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/23
- Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/21
Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/20
Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Dimitur Kirov, 2009/08/20
Re: [kazehakase]: FTBFS под GNU/Hurd: mozilla.cpp:132: error: 'PATH_MAX' was not declared in this scope, Yavor Doganov, 2009/08/26