ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] RPM::Database
@ 2005-10-18 23:30 Alexey Tourbin
  2005-10-19  9:05 ` Dmitry V. Levin
  0 siblings, 1 reply; 16+ messages in thread
From: Alexey Tourbin @ 2005-10-18 23:30 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

at@mash ~ $ perl -MRPM::Database -e1
panic: sv_setpvn called with negative strlen at /usr/lib/perl5/i386-linux/DynaLoader.pm line 253.
Compilation failed in require at /usr/lib/perl5/vendor_perl/i386-linux/RPM/Database.pm line 35.
Compilation failed in require.
BEGIN failed--compilation aborted.
at@mash ~ $

Вчера всё работало.
Что бы это могло быть?

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [devel] RPM::Database
  2005-10-18 23:30 [devel] RPM::Database Alexey Tourbin
@ 2005-10-19  9:05 ` Dmitry V. Levin
  2005-10-19 13:01   ` [devel] RPM::Database Alexey Tourbin
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry V. Levin @ 2005-10-19  9:05 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 623 bytes --]

On Wed, Oct 19, 2005 at 03:30:18AM +0400, Alexey Tourbin wrote:
> at@mash ~ $ perl -MRPM::Database -e1
> panic: sv_setpvn called with negative strlen at /usr/lib/perl5/i386-linux/DynaLoader.pm line 253.
> Compilation failed in require at /usr/lib/perl5/vendor_perl/i386-linux/RPM/Database.pm line 35.
> Compilation failed in require.
> BEGIN failed--compilation aborted.
> at@mash ~ $
> 
> Вчера всё работало.
> Что бы это могло быть?

На rpm-4.0.4-alt51 работает.
На rpm-4.0.4-alt52 не работает.

Изменений между rpm-4.0.4-alt51 и rpm-4.0.4-alt52 очень много.
Никакого setpvn в коде rpm нет.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [devel] Re: RPM::Database
  2005-10-19  9:05 ` Dmitry V. Levin
@ 2005-10-19 13:01   ` Alexey Tourbin
  2005-10-19 13:29     ` Dmitry V. Levin
  2005-10-19 13:56     ` Alexey Tourbin
  0 siblings, 2 replies; 16+ messages in thread
From: Alexey Tourbin @ 2005-10-19 13:01 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 746 bytes --]

On Wed, Oct 19, 2005 at 01:05:24PM +0400, Dmitry V. Levin wrote:
> On Wed, Oct 19, 2005 at 03:30:18AM +0400, Alexey Tourbin wrote:
> > at@mash ~ $ perl -MRPM::Database -e1
> > panic: sv_setpvn called with negative strlen at /usr/lib/perl5/i386-linux/DynaLoader.pm line 253.
> > Compilation failed in require at /usr/lib/perl5/vendor_perl/i386-linux/RPM/Database.pm line 35.
> > Compilation failed in require.
> > BEGIN failed--compilation aborted.
> > at@mash ~ $
> > 
> > Вчера всё работало.
> > Что бы это могло быть?
> 
> На rpm-4.0.4-alt51 работает.
> На rpm-4.0.4-alt52 не работает.
> 
> Изменений между rpm-4.0.4-alt51 и rpm-4.0.4-alt52 очень много.
> Никакого setpvn в коде rpm нет.

После пересборки perl-RPM работает.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [devel] Re: RPM::Database
  2005-10-19 13:01   ` [devel] RPM::Database Alexey Tourbin
@ 2005-10-19 13:29     ` Dmitry V. Levin
  2005-10-19 14:00       ` Alexey Tourbin
  2005-10-19 13:56     ` Alexey Tourbin
  1 sibling, 1 reply; 16+ messages in thread
From: Dmitry V. Levin @ 2005-10-19 13:29 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

On Wed, Oct 19, 2005 at 05:01:36PM +0400, Alexey Tourbin wrote:
> On Wed, Oct 19, 2005 at 01:05:24PM +0400, Dmitry V. Levin wrote:
> > On Wed, Oct 19, 2005 at 03:30:18AM +0400, Alexey Tourbin wrote:
> > > at@mash ~ $ perl -MRPM::Database -e1
> > > panic: sv_setpvn called with negative strlen at /usr/lib/perl5/i386-linux/DynaLoader.pm line 253.
> > > Compilation failed in require at /usr/lib/perl5/vendor_perl/i386-linux/RPM/Database.pm line 35.
> > > Compilation failed in require.
> > > BEGIN failed--compilation aborted.
> > > at@mash ~ $
> > > 
> > > Вчера всё работало.
> > > Что бы это могло быть?
> > 
> > На rpm-4.0.4-alt51 работает.
> > На rpm-4.0.4-alt52 не работает.
> > 
> > Изменений между rpm-4.0.4-alt51 и rpm-4.0.4-alt52 очень много.
> > Никакого setpvn в коде rpm нет.
> 
> После пересборки perl-RPM работает.

А в чём причина?


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [devel] Re: RPM::Database
  2005-10-19 13:01   ` [devel] RPM::Database Alexey Tourbin
  2005-10-19 13:29     ` Dmitry V. Levin
@ 2005-10-19 13:56     ` Alexey Tourbin
  2005-10-19 14:06       ` Dmitry V. Levin
  2005-10-19 14:18       ` Alexey Tourbin
  1 sibling, 2 replies; 16+ messages in thread
From: Alexey Tourbin @ 2005-10-19 13:56 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

On Wed, Oct 19, 2005 at 05:01:36PM +0400, Alexey Tourbin wrote:
> > Изменений между rpm-4.0.4-alt51 и rpm-4.0.4-alt52 очень много.
> > Никакого setpvn в коде rpm нет.
> После пересборки perl-RPM работает.

Сломался rpmTagTable.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [devel] Re: RPM::Database
  2005-10-19 13:29     ` Dmitry V. Levin
@ 2005-10-19 14:00       ` Alexey Tourbin
  0 siblings, 0 replies; 16+ messages in thread
From: Alexey Tourbin @ 2005-10-19 14:00 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 150 bytes --]

On Wed, Oct 19, 2005 at 05:29:48PM +0400, Dmitry V. Levin wrote:
> > После пересборки perl-RPM работает.
> А в чём причина?

Пробую разобраться.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [devel] Re: RPM::Database
  2005-10-19 13:56     ` Alexey Tourbin
@ 2005-10-19 14:06       ` Dmitry V. Levin
  2005-10-19 14:18       ` Alexey Tourbin
  1 sibling, 0 replies; 16+ messages in thread
From: Dmitry V. Levin @ 2005-10-19 14:06 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 445 bytes --]

On Wed, Oct 19, 2005 at 05:56:35PM +0400, Alexey Tourbin wrote:
> On Wed, Oct 19, 2005 at 05:01:36PM +0400, Alexey Tourbin wrote:
> > > Изменений между rpm-4.0.4-alt51 и rpm-4.0.4-alt52 очень много.
> > > Никакого setpvn в коде rpm нет.
> > После пересборки perl-RPM работает.
> 
> Сломался rpmTagTable.

Он (массив переменных типа struct headerTagTableEntry_s) не мог измениться
настолько, чтобы повлиять на приложения.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [devel] Re: RPM::Database
  2005-10-19 13:56     ` Alexey Tourbin
  2005-10-19 14:06       ` Dmitry V. Levin
@ 2005-10-19 14:18       ` Alexey Tourbin
  2005-10-19 15:50         ` Alexey Tourbin
  1 sibling, 1 reply; 16+ messages in thread
From: Alexey Tourbin @ 2005-10-19 14:18 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

On Wed, Oct 19, 2005 at 05:56:35PM +0400, Alexey Tourbin wrote:
> > После пересборки perl-RPM работает.
> Сломался rpmTagTable.

$ cat test.c
#include <stdio.h>
#include <rpmlib.h>
int main()
{
        const char *tag0 = rpmTagTable[0].name;
        fprintf(stdout, "tag0: %s$\n", tag0);
        return 0;
}
$ echo $ZSH_VERSION
4.3.0-dev-1
$ setopt EXTENDED_GLOB
$ sudo rpm -Uv --force --noscripts ~sisyphus/files/i586/RPMS/*rpm*-4.0.4-alt51.i586.rpm~*static*
Preparing packages for installation...
librpm-4.0.4-alt51
librpmbuild-4.0.4-alt51
librpm-devel-4.0.4-alt51
rpm-4.0.4-alt51
rpm-build-4.0.4-alt51
$ gcc -Wall -I/usr/include/rpm test.c -lrpm
$ ./a.out
tag0: RPMTAG_HEADERIMAGE$
$ sudo rpm -Uv --force --noscripts ~sisyphus/files/i586/RPMS/*rpm*-4.0.4-alt52.i586.rpm~*static*
Preparing packages for installation...
librpm-4.0.4-alt52
librpmbuild-4.0.4-alt52
librpm-devel-4.0.4-alt52
rpm-4.0.4-alt52
rpm-build-4.0.4-alt52
$ ./a.out
tag0:  @=$
$ gcc -Wall -I/usr/include/rpm test.c -lrpm
$ ./a.out
tag0: RPMTAG_HEADERIMAGE$
$

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [devel] Re: RPM::Database
  2005-10-19 14:18       ` Alexey Tourbin
@ 2005-10-19 15:50         ` Alexey Tourbin
  2005-10-19 17:17           ` Dmitry V. Levin
  0 siblings, 1 reply; 16+ messages in thread
From: Alexey Tourbin @ 2005-10-19 15:50 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 225 bytes --]

On Wed, Oct 19, 2005 at 06:18:10PM +0400, Alexey Tourbin wrote:
> On Wed, Oct 19, 2005 at 05:56:35PM +0400, Alexey Tourbin wrote:
> > > После пересборки perl-RPM работает.
> > Сломался rpmTagTable.
> $ cat test.c

Ну?

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [devel] Re: RPM::Database
  2005-10-19 15:50         ` Alexey Tourbin
@ 2005-10-19 17:17           ` Dmitry V. Levin
  2005-10-19 17:23             ` Alexey Tourbin
                               ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Dmitry V. Levin @ 2005-10-19 17:17 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1752 bytes --]

On Wed, Oct 19, 2005 at 07:50:32PM +0400, Alexey Tourbin wrote:
> On Wed, Oct 19, 2005 at 06:18:10PM +0400, Alexey Tourbin wrote:
> > On Wed, Oct 19, 2005 at 05:56:35PM +0400, Alexey Tourbin wrote:
> > > > После пересборки perl-RPM работает.
> > > Сломался rpmTagTable.
> > $ cat test.c
> 
> Ну?

Странно всё это:

$ cvs diff -u -r rpm-4_0_4-alt51 lib/rpmlib.h
[...]
--- lib/rpmlib.h	29 Feb 2004 14:14:02 -0000	1.6
+++ lib/rpmlib.h	17 Oct 2005 11:49:21 -0000
[...]
@@ -178,7 +196,7 @@
  */
 /*@-redecl@*/
 /*@observer@*/ /*@unchecked@*/
-extern const struct headerTagTableEntry_s rpmTagTable[];
+extern const struct headerTagTableEntry_s * rpmTagTable;
 /*@=redecl@*/
 
 /**

$ cat rttest.c
#include <stdio.h>
#include <rpmlib.h>
int main()
{
	printf("rpmTagTableSize = %i\nrpmTagTable = %p\nrpmTagTable[0].name = %s (%p)\n",
	       rpmTagTableSize, rpmTagTable,
	       rpmTagTable[0].name, rpmTagTable[0].name);
	return 0;
}

alt51$ gcc -Wall -Werror -I/usr/include/rpm rttest.c -lrpm -orttest-alt51
alt51$ ./rttest-alt51 
rpmTagTableSize = 125
rpmTagTable = 0x8049740
rpmTagTable[0].name = RPMTAG_HEADERIMAGE (0x16b8e4)

alt52$ gcc -Wall -Werror -I/usr/include/rpm rttest.c -lrpm -orttest-alt52
alt52$ ./rttest-alt52 
rpmTagTableSize = 125
rpmTagTable = 0x2b00a0
rpmTagTable[0].name = RPMTAG_HEADERIMAGE (0x2ae760)

alt51$ ./rttest-alt52 
./rttest-alt52: Symbol `rpmTagTable' has different size in shared object, consider re-linking
rpmTagTableSize = 125
rpmTagTable = 0x16b8e4
Segmentation fault

alt52$ ./rttest-alt51 
rpmTagTableSize = 125
rpmTagTable = 0x8049740
rpmTagTable[0].name = `Г* (0x2b00a0)

Тут он прав, полное Г*.

Ну что, придётся откатить этот backport?


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [devel] Re: RPM::Database
  2005-10-19 17:17           ` Dmitry V. Levin
@ 2005-10-19 17:23             ` Alexey Tourbin
  2005-10-19 17:43             ` Dmitry V. Levin
  2005-10-19 17:46             ` Alexey Tourbin
  2 siblings, 0 replies; 16+ messages in thread
From: Alexey Tourbin @ 2005-10-19 17:23 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

On Wed, Oct 19, 2005 at 09:17:25PM +0400, Dmitry V. Levin wrote:
> Тут он прав, полное Г*.
> Ну что, придётся откатить этот backport?

А в чем проблема-то?  Оффсеты в этой структуре изменились?
offsetof(headerTagTableEntry_s, name) что говорит?

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [devel] Re: RPM::Database
  2005-10-19 17:17           ` Dmitry V. Levin
  2005-10-19 17:23             ` Alexey Tourbin
@ 2005-10-19 17:43             ` Dmitry V. Levin
  2005-10-19 17:46             ` Alexey Tourbin
  2 siblings, 0 replies; 16+ messages in thread
From: Dmitry V. Levin @ 2005-10-19 17:43 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 471 bytes --]

On Wed, Oct 19, 2005 at 09:17:25PM +0400, Dmitry V. Levin wrote:
> On Wed, Oct 19, 2005 at 07:50:32PM +0400, Alexey Tourbin wrote:
> > On Wed, Oct 19, 2005 at 06:18:10PM +0400, Alexey Tourbin wrote:
> > > On Wed, Oct 19, 2005 at 05:56:35PM +0400, Alexey Tourbin wrote:
> > > > > После пересборки perl-RPM работает.
> > > > Сломался rpmTagTable.
> > > $ cat test.c
> > 
> > Ну?
> 
> Странно всё это:

Впрочем, ничего странного, надо откатывать.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [devel] Re: RPM::Database
  2005-10-19 17:17           ` Dmitry V. Levin
  2005-10-19 17:23             ` Alexey Tourbin
  2005-10-19 17:43             ` Dmitry V. Levin
@ 2005-10-19 17:46             ` Alexey Tourbin
  2005-10-19 18:00               ` Alexey Tourbin
  2005-10-19 18:04               ` Dmitry V. Levin
  2 siblings, 2 replies; 16+ messages in thread
From: Alexey Tourbin @ 2005-10-19 17:46 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

On Wed, Oct 19, 2005 at 09:17:25PM +0400, Dmitry V. Levin wrote:
> alt51$ ./rttest-alt52 
> ./rttest-alt52: Symbol `rpmTagTable' has different size in shared object, consider re-linking
> rpmTagTableSize = 125
> rpmTagTable = 0x16b8e4
> Segmentation fault
  ^^^
В этой ситуации вот что происходит:

#0  0x400d73ef in strlen () from /usr/lib/debug/libc.so.6
#1  0x400ae405 in _IO_vfprintf (s=0x4017c7e0,
    format=0x544d5052 <Address 0x544d5052 out of bounds>, ap=0xbffff1dc "ы\204\004\bфї\027@@ў")
    at vfprintf.c:1468
#2  0x400b496f in *__GI_fprintf (stream=0x544d5052,
    format=0x544d5052 <Address 0x544d5052 out of bounds>) at fprintf.c:32
#3  0x080484d4 in main () at test.c:6

(gdb) frame 3
#3  0x080484d4 in main () at test.c:6
6               fprintf(stdout, "tag0: %s$\n", tag0);
(gdb) p tag0
$1 = 0x544d5052 <Address 0x544d5052 out of bounds>
(gdb) p rpmTagTable
$2 = (const struct headerTagTableEntry_s *) 0x4006e8e4
(gdb) p rpmTagTable[0]
$3 = {name = 0x544d5052 <Address 0x544d5052 out of bounds>, val = 1214203713}

Такое впечатление, что происходит неправильный dereferencing, то есть
rpmTagTable в качестве указателя уже смотрит непойми куда.  Я озадачен. :)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [devel] Re: RPM::Database
  2005-10-19 17:46             ` Alexey Tourbin
@ 2005-10-19 18:00               ` Alexey Tourbin
  2005-10-19 18:04               ` Dmitry V. Levin
  1 sibling, 0 replies; 16+ messages in thread
From: Alexey Tourbin @ 2005-10-19 18:00 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]

On Wed, Oct 19, 2005 at 09:46:29PM +0400, Alexey Tourbin wrote:
> > Segmentation fault
>   ^^^
> В этой ситуации вот что происходит:
> 
> #0  0x400d73ef in strlen () from /usr/lib/debug/libc.so.6
> #1  0x400ae405 in _IO_vfprintf (s=0x4017c7e0,
>     format=0x544d5052 <Address 0x544d5052 out of bounds>, ap=0xbffff1dc "ы\204\004\bфї\027@@ў")
>     at vfprintf.c:1468
> #2  0x400b496f in *__GI_fprintf (stream=0x544d5052,
>     format=0x544d5052 <Address 0x544d5052 out of bounds>) at fprintf.c:32
> #3  0x080484d4 in main () at test.c:6
> 
> (gdb) frame 3
> #3  0x080484d4 in main () at test.c:6
> 6               fprintf(stdout, "tag0: %s$\n", tag0);
> (gdb) p tag0
> $1 = 0x544d5052 <Address 0x544d5052 out of bounds>
> (gdb) p rpmTagTable
> $2 = (const struct headerTagTableEntry_s *) 0x4006e8e4
> (gdb) p rpmTagTable[0]
> $3 = {name = 0x544d5052 <Address 0x544d5052 out of bounds>, val = 1214203713}
> 
> Такое впечатление, что происходит неправильный dereferencing, то есть
> rpmTagTable в качестве указателя уже смотрит непойми куда.  Я озадачен. :)

Хе-хе!  Вот что в этой ситуации присходит:

(gdb) p rpmTagTable
$10 = (const struct headerTagTableEntry_s *) 0x4006e8e4
(gdb) p (char*)rpmTagTable
$11 = 0x4006e8e4 "RPMTAG_HEADERIMAGE"
(gdb)

То есть один лишний dereferencing в этом случае почему-то происходит.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [devel] Re: RPM::Database
  2005-10-19 17:46             ` Alexey Tourbin
  2005-10-19 18:00               ` Alexey Tourbin
@ 2005-10-19 18:04               ` Dmitry V. Levin
  2005-10-19 19:07                 ` Alexey Tourbin
  1 sibling, 1 reply; 16+ messages in thread
From: Dmitry V. Levin @ 2005-10-19 18:04 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

On Wed, Oct 19, 2005 at 09:46:29PM +0400, Alexey Tourbin wrote:
> Такое впечатление, что происходит неправильный dereferencing, то есть
> rpmTagTable в качестве указателя уже смотрит непойми куда.  Я озадачен. :)

Это просто:

1. extern const struct headerTagTableEntry_s rpmTagTable[];
Что такое символ rpmTagTable для приложения?
Это адрес, по которому находится первый элемент массива.

2. extern const struct headerTagTableEntry_s * rpmTagTable;
Что такое символ rpmTagTable для приложения?
Это адрес, по которому находится адрес первого элемента массива.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [devel] Re: RPM::Database
  2005-10-19 18:04               ` Dmitry V. Levin
@ 2005-10-19 19:07                 ` Alexey Tourbin
  0 siblings, 0 replies; 16+ messages in thread
From: Alexey Tourbin @ 2005-10-19 19:07 UTC (permalink / raw)
  To: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

On Wed, Oct 19, 2005 at 10:04:00PM +0400, Dmitry V. Levin wrote:
> On Wed, Oct 19, 2005 at 09:46:29PM +0400, Alexey Tourbin wrote:
> > Такое впечатление, что происходит неправильный dereferencing, то есть
> > rpmTagTable в качестве указателя уже смотрит непойми куда.  Я озадачен. :)
> 
> Это просто:
> 
> 1. extern const struct headerTagTableEntry_s rpmTagTable[];
> Что такое символ rpmTagTable для приложения?
> Это адрес, по которому находится первый элемент массива.

Да.

> 2. extern const struct headerTagTableEntry_s * rpmTagTable;
> Что такое символ rpmTagTable для приложения?
> Это адрес, по которому находится адрес первого элемента массива.

Нет.  И тот и другой -- адрес первого элемента массива.  Только первый
адрес константный, его нельзя менять (компилятор сразу может проставить
сам этот адрес в код, но не проставляет).  А второй адрес можно менять,
компилятор обязан использовать косвенную адресацию.  Впрочем, я не до
конца понимаю, что там делает компилятор.  С точки зрения самого языка
Си эти две записи идентичны.

Нужно посмотреть, что там `gcc -S' показывает, но лень.  Но может
посмотрю. :)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2005-10-19 19:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-18 23:30 [devel] RPM::Database Alexey Tourbin
2005-10-19  9:05 ` Dmitry V. Levin
2005-10-19 13:01   ` [devel] RPM::Database Alexey Tourbin
2005-10-19 13:29     ` Dmitry V. Levin
2005-10-19 14:00       ` Alexey Tourbin
2005-10-19 13:56     ` Alexey Tourbin
2005-10-19 14:06       ` Dmitry V. Levin
2005-10-19 14:18       ` Alexey Tourbin
2005-10-19 15:50         ` Alexey Tourbin
2005-10-19 17:17           ` Dmitry V. Levin
2005-10-19 17:23             ` Alexey Tourbin
2005-10-19 17:43             ` Dmitry V. Levin
2005-10-19 17:46             ` Alexey Tourbin
2005-10-19 18:00               ` Alexey Tourbin
2005-10-19 18:04               ` Dmitry V. Levin
2005-10-19 19:07                 ` 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