Re: apr_bucket_type_{eos,file,flush} being defined in BSS of httpd during build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian Buesker wrote:
I was debugging some issues related to locking in mod_dav_svn this week,
and eventually tracked down the problem to the fact that
apr_bucket_type_eos was being included in the BSS segment of the httpd
executable (two other apr_bucket_types are also included in the BSS).
This definition causes usage of APR_BUCKET_IS_EOS to fail in mod_dav_svn.

 From what I can tell, these symbols should not be defined in the httpd
executable but instead should be picked up from the apr-util library. nm
shows these symbols in the Data segment of libapr-util-1.so.0.2.12, but
also in the BSS of httpd of my vanilla httpd build. The RHEL5U2 build
only shows them in the data segment of the apr-util library.

# nm .libs/httpd  | grep apr_bucket_type
0000000000688880 B apr_bucket_type_eos
0000000000688840 B apr_bucket_type_file
00000000006888c0 B apr_bucket_type_flush

# nm srclib/apr-util/.libs/libaprutil-1.so.0.2.12  | grep apr_bucket_type
0000000000218180 D apr_bucket_type_eos
00000000002181c0 D apr_bucket_type_file
0000000000218200 D apr_bucket_type_flush
0000000000218240 D apr_bucket_type_heap
0000000000218340 D apr_bucket_type_immortal
0000000000218280 D apr_bucket_type_mmap
00000000002182c0 D apr_bucket_type_pipe
0000000000218300 D apr_bucket_type_pool
00000000002183c0 D apr_bucket_type_socket
0000000000218380 D apr_bucket_type_transient

# nm /usr/lib/debug/usr/sbin/httpd.debug  | grep apr_bucket_type
                 U apr_bucket_type_eos
                 U apr_bucket_type_file
                 U apr_bucket_type_flush

I tried doing an nm on all the .o's and .a's in a build to see if any of
them happened to have these symbols in the BSS, but sure enough, they
did not.

Does anyone have an idea of what could be causing these symbols to be
included in httpd's uninitialized data (BSS) segment? Are there any
suggested workarounds? The only workaround (which is more of a hack than
anything else) I've come up with right now is to modify
APR_BUCKET_IS_EOS to do a strcmp on the type name rather than comparing
the pointer values.
In case anybody else runs into this, I eventually found that by building apache with --enable-pie, these symbols were not included in the BSS, and locking with mod_dav_svn worked just fine.

Brian


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux