pkgsrc-Users archive

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

Re: Removing editors/hnb "Hierarchical NoteBook"



On Wed, Nov 21, 2018 at 1:19 PM <coypu%sdf.org@localhost> wrote:
>
> This package segfaults at startup. I tried to make some amendments to
> it (make sure it's all built with ncurses), but it is still doing this.
>
> If anyone is interested in it, give a shoutout and I'll make an effort
> to fix it.
>
> Otherwise, I will remove it in 1 month.
>
> Thanks.

I tried to build and run the package in an i386 VM running NetBSD 8.0
and the application did popup with a curses interface, but it was
corrupt (but with readable text) probably because of my terminal
settings.

Also there were many "pointer-to-int-cast" warning messages during the
build, so this led me to investigate the original code which has not
been updated since 2003 and I found out that there are a lot pointer
references have been explicitly type cast to "int".

Doing this in a 32-bit system was forgiving, but converting 64-bit
pointer addresses to 32-bit int caused the pointers to be corrupt
which ended up causing the segfault.

After a bit of tinkering around I came up with a patch (based on the
original code base hnb-1.9.17) which I modified (in a rather ugly way)
so that it would build and run in amd64 system.

Once the changes were done, the resulting binary from the executable
did not segfault on run in NetBSD 8.0 on amd64, the curses interface
gave me a similar experience to the i386 probably again due to my
terminal settings.

I have attached the patch for reference.

If any one is interested I could improve upon the fixes or help
integrate the changes back to pkgsrc.

--
Santhosh

Attachment: hnb-fix.patch
Description: Binary data



Home | Main Index | Thread Index | Old Index