Bug 115969 - [patch] devel/anjuta crash due to incorrect patch in ports tree
Summary: [patch] devel/anjuta crash due to incorrect patch in ports tree
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-31 15:40 UTC by Oleg Sharoiko
Modified: 2007-09-04 00:00 UTC (History)
0 users

See Also:


Attachments
file.diff (2.04 KB, patch)
2007-08-31 15:40 UTC, Oleg Sharoiko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Sharoiko 2007-08-31 15:40:00 UTC
Patch in files/patch-plugins_document-manager_anjuta-docman.c introduces a bug
causing anjuta to crash when opening file over nfs.

Here is the fragment of the code after `make patch' (lines 931 and 932 of
plugins/document-manager/anjuta-docman.c)

        if (normalized_path == NULL)
                (void) strlcpy (normalized_path, uri, PATH_MAX);

This code can not work:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x8062000 (LWP 100243)]
0x292c6d9b in strlcpy () from /lib/libc.so.6
(gdb) bt
#0  0x292c6d9b in strlcpy () from /lib/libc.so.6
#1  0x2b412d7f in anjuta_docman_goto_file_line_mark (docman=0x8654018, 
    fname=0x81c0c40 "file:///usr/home/os/src/tst.cc#11", line=-1, mark=1)
    at anjuta-docman.c:932
#2  0x2b41015f in ifile_open (plugin=0x8482d48, 
    uri=0x81c0c40 "file:///usr/home/os/src/tst.cc#11", e=0x0) at plugin.c:1776

Fix: Replace contents of files/patch-plugins_document-manager_anjuta-docman.c
by the following lines:
 
How-To-Repeat: 	Build/install anjuta.
	Try to open file on nfs (in my case $HOME was on nfs).
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-09-01 07:16:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2007-09-03 23:51:05 UTC
State Changed
From-To: open->closed

Duh, the check for NULL is right there.  I clearly wasn't paying attention when 
I did this patch the first time.  Thanks for fixing it.
Comment 3 dfilter service freebsd_committer freebsd_triage 2007-09-03 23:51:06 UTC
marcus      2007-09-03 22:50:59 UTC

  FreeBSD ports repository

  Modified files:
    devel/anjuta         Makefile 
    devel/anjuta/files   
                         patch-plugins_document-manager_anjuta-docman.c 
  Log:
  Fix a really stupid mistake on my part, and correct a crash when opening
  files over NFS.
  
  PR:             115969
  Submitted by:   Oleg Sharoiko <os@rsu.ru>
  
  Revision  Changes    Path
  1.53      +1 -1      ports/devel/anjuta/Makefile
  1.2       +20 -14    ports/devel/anjuta/files/patch-plugins_document-manager_anjuta-docman.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"