Hi Petr,
thanks for having a look into this.
On Tue, Dec 15, 2009 at 05:53:12PM +0100, Petr Salinger wrote:
> Axel, please, could you verify, whether patch bellow fixes it for you ?
>
> [...]
>
> --- os_freebsd.cpp
> +++ os_freebsd.cpp
> @@ -164,7 +164,15 @@
>
> #ifdef __GLIBC__
> static inline void * reallocf(void *ptr, size_t size) {
> - void *rv = realloc(ptr, size);
> + void *rv;
> +
> + if (size == 0)
> + {
> + free(ptr);
> + return NULL;
> + }
> +
> + rv = realloc(ptr, size);
> if(rv == NULL)
> free(ptr);
> return rv;
Unfortunately it doesn't seem to help. I added your patch via quilt:
[...]
Applying patch 63_removable.patch
patching file smartd.conf
Applying patch 64_realloc_kfreebsd.patch
patching file os_freebsd.cpp
Now at patch 64_realloc_kfreebsd.patch
touch debian/stamp-patched
dh_testdir
[...]
But when installing (even on reinstalling the new version), it still
dumps core with "double free or corruption":
!553 Z63 ?0 L1 r...@metisse:ttyp0 (-zsh) 16:12:52 [~] # dpkg -i
~abe/debian/smartmontools_5.39-1.1_kfreebsd-i386.deb
(Reading database ... 531210 files and directories currently installed.)
Preparing to replace smartmontools 5.39-1 (using
.../smartmontools_5.39-1.1_kfreebsd-i386.deb) ...
Stopping S.M.A.R.T. daemon: smartd.
Unpacking replacement smartmontools ...
Setting up smartmontools (5.39-1.1) ...
Starting S.M.A.R.T. daemon: smartdNo device match or lack of permissions.
No device match or lack of permissions.
*** glibc detected *** /usr/sbin/smartd: double free or corruption (top):
0x0808fa78 ***
Aborted (core dumped)
failed!
invoke-rc.d: initscript smartmontools, action "start" failed.
dpkg: error processing smartmontools (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db ...
Errors were encountered while processing:
smartmontools
dpkg -i ~abe/debian/smartmontools_5.39-1.1_kfreebsd-i386.deb 4.99s user 1.85s
system 75% cpu 9.048 total
!554 Z64 ?1 L1 r...@metisse:ttyp0 (-zsh) 16:14:53 [~] # dpkg -i
~abe/debian/smartmontools_5.39-1.1_kfreebsd-i386.deb
(Reading database ... 531210 files and directories currently installed.)
Preparing to replace smartmontools 5.39-1.1 (using
.../smartmontools_5.39-1.1_kfreebsd-i386.deb) ...
Stopping S.M.A.R.T. daemon: smartd.
Unpacking replacement smartmontools ...
Setting up smartmontools (5.39-1.1) ...
Starting S.M.A.R.T. daemon: smartdNo device match or lack of permissions.
No device match or lack of permissions.
*** glibc detected *** /usr/sbin/smartd: double free or corruption (top):
0x0808fa78 ***
Aborted (core dumped)
failed!
invoke-rc.d: initscript smartmontools, action "start" failed.
dpkg: error processing smartmontools (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for man-db ...
Errors were encountered while processing:
smartmontools
dpkg -i ~abe/debian/smartmontools_5.39-1.1_kfreebsd-i386.deb 4.77s user 2.04s
system 79% cpu 8.596 total
!554 Z65 ?1 L1 r...@metisse:ttyp0 (-zsh) 16:15:21 [~] #
Anything else I can help? Petr: If you're on IRC. I'm XTaran in
#debian-kbsd on OFTC.
Regards, Axel
--
Axel Beckert - [email protected], [email protected] - http://noone.org/abe/
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]