Bug 217516

Summary: editors/jove: previous port patch sends calls to internal function to stdlib, causing core dumps
Product: Ports & Packages Reporter: crahman
Component: Individual Port(s)Assignee: Tobias Kortkamp <tobik>
Status: Closed FIXED    
Severity: Affects Many People CC: tobik
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Four additional patch files for editors/jove
none
jove.diff none

Description crahman 2017-03-03 10:30:02 UTC
Created attachment 180459 [details]
Four additional patch files for editors/jove

Jove used an internal function named 'getline()' to save and read its recovery file.  This call was renamed get_line() by a previous port patch, but only in its definition.  The code that called it was not changed, causing the stdlib getline() to be called with incorrect arguments.  This broke jove's recovery function and caused core dumps.

The attached patches finsh the work by renaming the internal getline to get_line() throughout the code.

These four patch files should be added to the files directory.
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2017-03-03 10:56:21 UTC
Created attachment 180460 [details]
jove.diff

(In reply to crahman from comment #0)
> The attached patches finsh the work by renaming the internal getline to get_line() throughout the code.

How about using REINPLACE_CMD for this?  Can you test the attached patch?
Comment 2 crahman 2017-03-03 19:47:37 UTC
(In reply to Tobias Kortkamp from comment #1)

I've tested your alternative patch to the Makefile and it is correct.
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2017-03-03 23:40:41 UTC
Thanks for testing.  Now waiting for mentor approval.

https://reviews.freebsd.org/D9881
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-03-04 00:03:17 UTC
A commit references this bug:

Author: tobik
Date: Sat Mar  4 00:03:01 UTC 2017
New revision: 435376
URL: https://svnweb.freebsd.org/changeset/ports/435376

Log:
  JOVE defines a getline function that collides with getline(3).
  r419275 tried to fix it by renaming it to get_line, but a few renames
  were missed leading to crashes when trying to run JOVE.  Finish the
  previous work and also add LICENSE while here.

  PR:		217516
  Submitted by:	crahman@gmail.com (based on)
  Reviewed by:	crahman@gmail.com
  Approved by:	mat (mentor)
  Differential Revision:	https://reviews.freebsd.org/D9881

Changes:
  head/editors/jove/Makefile
  head/editors/jove/files/patch-io.c
  head/editors/jove/files/patch-io.h
  head/editors/jove/files/patch-recover.c
  head/editors/jove/pkg-descr