Bug 217516 - editors/jove: previous port patch sends calls to internal function to stdlib, causing core dumps
Summary: editors/jove: previous port patch sends calls to internal function to stdlib,...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-03 10:30 UTC by crahman
Modified: 2017-03-04 00:04 UTC (History)
1 user (show)

See Also:


Attachments
Four additional patch files for editors/jove (2.51 KB, text/plain)
2017-03-03 10:30 UTC, crahman
no flags Details
jove.diff (3.05 KB, patch)
2017-03-03 10:56 UTC, Tobias Kortkamp
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 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 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 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