Bug 143999

Summary: On FreeBSD/amd64, the software crash if the environment variable LANG is defined.
Product: Ports & Packages Reporter: katsuyoshi.ohara
Component: Individual Port(s)Assignee: Pav Lucistnik <pav>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description katsuyoshi.ohara 2010-02-16 11:20:00 UTC
In the source,  stdlib.h is not included.
So the function getenv is not declared and has the return type of int.
The type casting from integer to pointer causes a segmentation violation
if getenv("LANG") != 0.

Fix: 

I send a patch file "ports/japanese/ack/files/patch-ab".
How-To-Repeat: $ LANG=ja_JP.eucJP
$ export LANG
$ ack -h
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2010-02-16 13:34:14 UTC
State Changed
From-To: open->feedback

Hi, 

no patch was attached to this report. 

Also, I cannot reproduce (without your patch): 

~/cvs/freebsd/ports/japanese/ack/work/ack139 $ LANG=ja_JP.eucJP ./ack -h 
ack v1.39 Copyright 1993,94 Ogasawara Hiroyuki (COR.) 
usage: ack [-{e|s|j|c[c]}] [-{a|A|o<file>}] [-zCntud] [-{E|S}] [<file>..] 



Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2010-02-16 13:34:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Hi, 

no patch was attached to this report. 

Also, I cannot reproduce (without your patch): 

~/cvs/freebsd/ports/japanese/ack/work/ack139 $ LANG=ja_JP.eucJP ./ack -h 
ack v1.39 Copyright 1993,94 Ogasawara Hiroyuki (COR.) 
usage: ack [-{e|s|j|c[c]}] [-{a|A|o<file>}] [-zCntud] [-{E|S}] [<file>..]
Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2010-02-16 19:36:52 UTC
State Changed
From-To: feedback->closed

Committed, thanks!
Comment 4 dfilter service freebsd_committer freebsd_triage 2010-02-16 19:37:54 UTC
pav         2010-02-16 19:37:41 UTC

  FreeBSD ports repository

  Modified files:
    japanese/ack         Makefile 
  Added files:
    japanese/ack/files   patch-kmain.c 
  Log:
  - Fix runtime segfault on amd64
  
  PR:             ports/143999
  Submitted by:   Katsuyoshi OHARA <ohara@air.s.kanazawa-u.ac.jp>
  Feature safe:   yes
  
  Revision  Changes    Path
  1.10      +1 -0      ports/japanese/ack/Makefile
  1.1       +11 -0     ports/japanese/ack/files/patch-kmain.c (new)
_______________________________________________
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"