* [devel] Re: lua5-posix-2003.11.07-alt2: rebuild failed [1] @ 2005-06-29 3:00 ` Alexey Tourbin 2005-06-29 5:40 ` Anton Farygin 0 siblings, 1 reply; 6+ messages in thread From: Alexey Tourbin @ 2005-06-29 3:00 UTC (permalink / raw) To: devel [-- Attachment #1: Type: text/plain, Size: 1116 bytes --] On Tue, Jun 28, 2005 at 03:48:25PM +0400, QA Team Robot wrote: > + gcc -shared -pipe -Wall -O2 -march=i586 -mcpu=i686 -fPIC -DPIC lposix.c -o posix.so -llua -llualib > + lua5 -e 'assert(loadlib("./posix.so", "luaopen_posix"))(); assert(posix)' test.lua > /usr/src/tmp/rpm-tmp.93540: line 96: 10053 Segmentation fault lua5 -e 'assert(loadlib("./posix.so", "luaopen_posix"))(); assert(posix)' test.lua lua сломана. $ lua -e 'print(2*0.1+5)' zsh: segmentation fault lua -e 'print(2*0.1+5)' $ Из-за безобидного патча, который сделал mouse (#6539). lua-5.0.2-alt-lu_hash-intptr.patch --- lua-5.0.2/src/llimits.h.orig 2003-02-20 22:33:23 +0300 +++ lua-5.0.2/src/llimits.h 2004-08-30 23:12:06 +0400 @@ -11,6 +11,7 @@ #include <limits.h> #include <stddef.h> +#include <stdint.h> #include "lua.h" @@ -41,7 +42,7 @@ */ /* an unsigned integer to hold hash values */ -typedef unsigned int lu_hash; +typedef intptr_t lu_hash; /* its signed equivalent */ typedef int ls_hash; Если пересобрать без этого патча, то всё работает. Что-то прямо не знаю, что теперь делать. [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [devel] Re: lua5-posix-2003.11.07-alt2: rebuild failed [1] 2005-06-29 3:00 ` [devel] Re: lua5-posix-2003.11.07-alt2: rebuild failed [1] Alexey Tourbin @ 2005-06-29 5:40 ` Anton Farygin 2005-06-29 5:59 ` Alexey Tourbin 2005-06-29 6:09 ` Anton D. Kachalov 0 siblings, 2 replies; 6+ messages in thread From: Anton Farygin @ 2005-06-29 5:40 UTC (permalink / raw) To: ALT Devel discussion list В письме Wed, 29 Jun 2005 07:00:21 +0400, Alexey Tourbin написал: > On Tue, Jun 28, 2005 at 03:48:25PM +0400, QA Team Robot wrote: >> + gcc -shared -pipe -Wall -O2 -march=i586 -mcpu=i686 -fPIC -DPIC lposix.c -o posix.so -llua -llualib >> + lua5 -e 'assert(loadlib("./posix.so", "luaopen_posix"))(); assert(posix)' test.lua >> /usr/src/tmp/rpm-tmp.93540: line 96: 10053 Segmentation fault lua5 -e 'assert(loadlib("./posix.so", "luaopen_posix"))(); assert(posix)' test.lua > > lua сломана. > > $ lua -e 'print(2*0.1+5)' > zsh: segmentation fault lua -e 'print(2*0.1+5)' > $ > > Из-за безобидного патча, который сделал mouse (#6539). > lua-5.0.2-alt-lu_hash-intptr.patch > > --- lua-5.0.2/src/llimits.h.orig 2003-02-20 22:33:23 +0300 > +++ lua-5.0.2/src/llimits.h 2004-08-30 23:12:06 +0400 > @@ -11,6 +11,7 @@ > #include <limits.h> > #include <stddef.h> > > +#include <stdint.h> > > #include "lua.h" > > @@ -41,7 +42,7 @@ > */ > > /* an unsigned integer to hold hash values */ > -typedef unsigned int lu_hash; > +typedef intptr_t lu_hash; > /* its signed equivalent */ > typedef int ls_hash; > > Если пересобрать без этого патча, то всё работает. > Что-то прямо не знаю, что теперь делать. Отрывать патч, естественно. Это похоже последствия портирования на x86_64 ;-) Rgds, Rider ^ permalink raw reply [flat|nested] 6+ messages in thread
* [devel] Re: lua5-posix-2003.11.07-alt2: rebuild failed [1] 2005-06-29 5:40 ` Anton Farygin @ 2005-06-29 5:59 ` Alexey Tourbin 2005-06-29 6:09 ` Anton D. Kachalov 1 sibling, 0 replies; 6+ messages in thread From: Alexey Tourbin @ 2005-06-29 5:59 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 531 bytes --] On Wed, Jun 29, 2005 at 09:40:22AM +0400, Anton Farygin wrote: > > /* an unsigned integer to hold hash values */ > > -typedef unsigned int lu_hash; > > +typedef intptr_t lu_hash; > > /* its signed equivalent */ > > typedef int ls_hash; > > > > Если пересобрать без этого патча, то всё работает. > > Что-то прямо не знаю, что теперь делать. > > Отрывать патч, естественно. > Это похоже последствия портирования на x86_64 ;-) Угу. Я попробовал посмотерть в gdb, что там происходит, но пока ничего не понял.... [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [devel] Re: lua5-posix-2003.11.07-alt2: rebuild failed [1] 2005-06-29 5:40 ` Anton Farygin 2005-06-29 5:59 ` Alexey Tourbin @ 2005-06-29 6:09 ` Anton D. Kachalov 2005-06-29 6:30 ` Alexey Tourbin 1 sibling, 1 reply; 6+ messages in thread From: Anton D. Kachalov @ 2005-06-29 6:09 UTC (permalink / raw) To: ALT Devel discussion list On Wed, Jun 29, 2005 at 09:40:22AM +0400, Anton Farygin wrote: > Отрывать патч, естественно. Ничего естественного. Фиксить надо, а не отрывать. Кстати, фиксил я lua5-5.x.x, а не lua5-posix-... > > Это похоже последствия портирования на x86_64 ;-) Это кривая lua. Вот из-за чего взялся этот патч (для lua5-5.0.2): ltable.c: In function `luaH_mainposition': ltable.c:108: warning: cast from pointer to integer of different size ltable.c:110: warning: cast from pointer to integer of different size Это из-за функции IntPoint (llimits.h): /* ** conversion of pointer to integer ** this is for hashing only; there is no problem if the integer ** cannot hold the whole pointer value */ #define IntPoint(p) ((lu_hash)(p)) А ещё <stdint.h>: #if __WORDSIZE == 64 typedef long int intptr_t; typedef unsigned long int uintptr_t; #else typedef int intptr_t; typedef unsigned int uintptr_t; #endif Есть предложение заменить intptr_t на uintptr_t. Rgds, Anton ^ permalink raw reply [flat|nested] 6+ messages in thread
* [devel] Re: lua5-posix-2003.11.07-alt2: rebuild failed [1] 2005-06-29 6:09 ` Anton D. Kachalov @ 2005-06-29 6:30 ` Alexey Tourbin 2005-06-29 8:09 ` Alexey Tourbin 0 siblings, 1 reply; 6+ messages in thread From: Alexey Tourbin @ 2005-06-29 6:30 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 1529 bytes --] On Wed, Jun 29, 2005 at 10:09:16AM +0400, Anton D. Kachalov wrote: > On Wed, Jun 29, 2005 at 09:40:22AM +0400, Anton Farygin wrote: > > Отрывать патч, естественно. > Ничего естественного. Фиксить надо, а не отрывать. > Кстати, фиксил я lua5-5.x.x, а не lua5-posix-... И тот и другой теперь не работают. lua5-posix демонстрирует segfault во время теста при сборке. Я первый раз этому большого значения не придал, а когда появилось "rebuild failed [1]", стало ясно, что что-то не так. Я ещё иногда использую lua в качестве кальукулятора, и сегодня при перемножении двух чисел получил segfault. Тут-то я и всполошился. :) > > Это похоже последствия портирования на x86_64 ;-) > > Это кривая lua. Вот из-за чего взялся этот патч (для lua5-5.0.2): > ltable.c: In function `luaH_mainposition': > ltable.c:108: warning: cast from pointer to integer of different size > ltable.c:110: warning: cast from pointer to integer of different size > > Это из-за функции IntPoint (llimits.h): > /* > ** conversion of pointer to integer > ** this is for hashing only; there is no problem if the integer > ** cannot hold the whole pointer value > */ > #define IntPoint(p) ((lu_hash)(p)) > > А ещё <stdint.h>: > #if __WORDSIZE == 64 > typedef long int intptr_t; > typedef unsigned long int uintptr_t; > #else > typedef int intptr_t; > typedef unsigned int uintptr_t; > #endif > > Есть предложение заменить intptr_t на uintptr_t. Сейчас попробую. [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [devel] Re: lua5-posix-2003.11.07-alt2: rebuild failed [1] 2005-06-29 6:30 ` Alexey Tourbin @ 2005-06-29 8:09 ` Alexey Tourbin 0 siblings, 0 replies; 6+ messages in thread From: Alexey Tourbin @ 2005-06-29 8:09 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 458 bytes --] On Wed, Jun 29, 2005 at 10:30:00AM +0400, Alexey Tourbin wrote: > > А ещё <stdint.h>: > > #if __WORDSIZE == 64 > > typedef long int intptr_t; > > typedef unsigned long int uintptr_t; > > #else > > typedef int intptr_t; > > typedef unsigned int uintptr_t; > > #endif > > > > Есть предложение заменить intptr_t на uintptr_t. > > Сейчас попробую. Работает. Исправленная версия ушла в /i/S. [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-29 8:09 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-06-29 3:00 ` [devel] Re: lua5-posix-2003.11.07-alt2: rebuild failed [1] Alexey Tourbin 2005-06-29 5:40 ` Anton Farygin 2005-06-29 5:59 ` Alexey Tourbin 2005-06-29 6:09 ` Anton D. Kachalov 2005-06-29 6:30 ` Alexey Tourbin 2005-06-29 8:09 ` Alexey Tourbin
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git