Received: (qmail 49281 invoked by uid 501); 1 Dec 2000 09:52:14 -0000 Message-Id: <20001201095214.49280.qmail@locus.apache.org> Date: 1 Dec 2000 09:52:14 -0000 From: Claudio Cicali Reply-To: c.cicali@mclink.it To: submit@bugz.apache.org Subject: couldn't get any error code while apache refused to start itself when it failed to load a module X-Send-Pr-Version: 3.110 >Number: 6917 >Category: apache-api >Synopsis: couldn't get any error code while apache refused to start itself when it failed to load a module >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Fri Dec 01 02:00:01 PST 2000 >Closed-Date: Tue Dec 12 22:05:14 PST 2000 >Last-Modified: Tue Dec 12 22:05:14 PST 2000 >Originator: c.cicali@mclink.it >Release: 1.3.14 >Organization: >Environment: Windows NT 4 SP6a >Description: Im working on a module for Apache for Windows NT and, while trying to have the job done, I discovered a (little) bug in the source file util_win32.c. Bug description: I couldn't get any error code while apache refused to start itself up, being unable to load my module. The module itself loads up another DLL. This load is not performed via the LoadLibrary Windows API function, but using the __declspec(dllimport) feature, linking the module against the .lib the comes out after the building of the (second) DLL. Bug discover and trapped ! The problem is in the function ap_os_dso_error(). It simply lacks of the inizialization of the variable "len". >How-To-Repeat: >Fix: So, where I read: nErrorCode = GetLastError(); len = ap_snprintf(errstr, sizeof(errstr) - len, "(%d) ", nErrorCode); I'll read: nErrorCode = GetLastError(); len = 0; len = ap_snprintf(errstr, sizeof(errstr) - len, "(%d) ", nErrorCode); In this way the error is correctly displayed. >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: wrowe State-Changed-When: Tue Dec 12 22:05:13 PST 2000 State-Changed-Why: Good catch, fixed for release 1.3.15! Thanks for your interest in the Apache httpd server project. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]