Issue 1882 - back-perl coding error
Summary: back-perl coding error
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-13 09:24 UTC by zvr@pobox.com
Modified: 2014-08-01 21:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description zvr@pobox.com 2002-06-13 09:24:14 UTC
Full_Name: Alexios Zavras
Version: 2.1.2
OS: GNU/Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.251.255.7)


While building openldap-2.1.2, with --enable-perl,
I got a compilation error:
> modify.c: In function `perl_back_modify':
> modify.c:72: request for member `ad_cname' in something not a structure or
union
The line in question contains:
> XPUSHs(sv_2mortal(newSVpv( mods->sm_desc.ad_cname.bv_val, 0 )));

By looking at the definitions in servers/slapd/slap.h, it seems
that "mods", a "Modification *" has a member "sm_desc" which is
a "AttributeDescription *", not a "AttributeDescription".

My guess is that the correct way to write the line should be:
> XPUSHs(sv_2mortal(newSVpv( mods->sm_desc->ad_cname.bv_val, 0 )));

But I haven't actually looked further into it
(just what I can glimpse from C definitions).
On the other hand, how did it ever compile with such a blatant error ?

Comment 1 Kurt Zeilenga 2002-06-13 13:26:02 UTC
Fixed in HEAD.

At 02:24 AM 2002-06-13, zvr@pobox.com wrote:
>Full_Name: Alexios Zavras
>Version: 2.1.2
>OS: GNU/Linux
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (195.251.255.7)
>
>
>While building openldap-2.1.2, with --enable-perl,
>I got a compilation error:
>> modify.c: In function `perl_back_modify':
>> modify.c:72: request for member `ad_cname' in something not a structure or
>union
>The line in question contains:
>> XPUSHs(sv_2mortal(newSVpv( mods->sm_desc.ad_cname.bv_val, 0 )));
>
>By looking at the definitions in servers/slapd/slap.h, it seems
>that "mods", a "Modification *" has a member "sm_desc" which is
>a "AttributeDescription *", not a "AttributeDescription".
>
>My guess is that the correct way to write the line should be:
>> XPUSHs(sv_2mortal(newSVpv( mods->sm_desc->ad_cname.bv_val, 0 )));
>
>But I haven't actually looked further into it
>(just what I can glimpse from C definitions).
>On the other hand, how did it ever compile with such a blatant error ?

Comment 2 Kurt Zeilenga 2002-06-13 13:38:37 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 3 Kurt Zeilenga 2002-06-20 21:32:52 UTC
changed state Test to Release
Comment 4 Kurt Zeilenga 2002-06-20 21:33:35 UTC
changed notes
Comment 5 Kurt Zeilenga 2002-07-28 12:32:57 UTC
changed notes
changed state Release to Closed
Comment 6 OpenLDAP project 2014-08-01 21:06:24 UTC
fixed in HEAD
fixed in re21