Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264889 - sys-devel/bc-1.06.95 is leaking memory
Summary: sys-devel/bc-1.06.95 is leaking memory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-04 15:37 UTC by Mattias Nissler
Modified: 2015-07-13 05:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch (memleak_fix.patch,682 bytes, patch)
2009-04-04 15:37 UTC, Mattias Nissler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mattias Nissler 2009-04-04 15:37:01 UTC
I'm running bc as a computation slave process. I noticed that over time it eats up memory.

Reproducible: Always

Steps to Reproduce:
The following illustrates the memory leaks:

echo "define func(a) { if (a <= 5) { return a } else { return 5 } }; func(3)" | valgrind --tool=memcheck --leak-check=full bc




Portage 2.1.6.11 (default/linux/amd64/2008.0/no-multilib, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29-rc2-wl-mattias_rt2x00-testing x86_64)
=================================================================
System uname: Linux-2.6.29-rc2-wl-mattias_rt2x00-testing-x86_64-Intel-R-_Core-TM-2_CPU_6420_@_2.13GHz-with-glibc2.2.5
Timestamp of tree: Sun, 29 Mar 2009 16:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p10-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.3
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.6
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona -mtune=nocona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona -mtune=nocona"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collison-protect distlocks fixpackages nostrip parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 a52aac aac aalib acl acpi alsa amd64 amr apache2 applet audiofile avahi avi bash-completion bcmath berkdb bluetooth bogofilter bzip2 bzlib cairo caps cdda cddb cdparanoia cdr cli cracklib crypt ctype cups daap dbus dia doc dri dts dvb dvd dvdnav dvdr dvdread dvi encode exif fam fbcon ffmpeg fftw firefox flac fortran ftp fuse gdbm gif gimp glib glitz gnome gnome-keyring gnutls graphviz gs gstreamer gtk gtk2 gtkhtml guile hal iconv imagemagick imlib iproute2 ipv6 isdnlog jabber jack jadetex java jpeg jpeg2k kpathsea ladspa lesstif libnotify libwww lirc lm_sensors lua mad matroska mbox midi mikmod mime mmap mmx mng mono motif mp3 mpeg mudflap musicbrainz mysql nautilus ncurses networking networkmanager new-login nls nptl nptlonly nsplugin ogg oggvorbis opengl openmp pam pango pci pcmcia pcre pdf perl pidgin png postscript pppd python qt readline recode reflection ruby samba sdl session shared sharedmem smp sndfile sockets socks5 speex spell spl sse sse2 sse3 ssl svg sysfs t1lib tcl tcpd tetex theora threads threadsafe tiff tk truetype udev unicode usb v4l v4l2 vcd vhosts vorbis wmf wxwindows x264 xanim xcb xcomposite xine xinerama xlocale xml xml2 xorg xpm xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" LIRC_DEVICES="devinput" USERLAND="GNU" VIDEO_CARDS="ati radeon fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mattias Nissler 2009-04-04 15:37:36 UTC
Created attachment 187307 [details, diff]
Proposed patch

This patch fixes the problem for me.
Comment 2 Mattias Nissler 2009-04-04 15:41:19 UTC
I've also notified upstream and submitted the patch to them.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-09-20 13:20:21 UTC
Well, this is an old bug. I'd like to:

1) Put this in as a revbump since it was submitted upstream.
2) Call arches to stabilize soon thereafter since the current ~arch version has been there for almost a year.

@base-system: Ok to proceed with that plan?
Comment 4 Benedikt Böhm (RETIRED) gentoo-dev 2012-07-09 07:08:10 UTC
please do it! @base-system doesn't seem to care ...
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2012-07-09 09:51:56 UTC
(In reply to comment #2)
> I've also notified upstream and submitted the patch to them.

Got a link for reference?
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2012-07-09 09:52:42 UTC
(In reply to comment #3)
> Well, this is an old bug. I'd like to:
> 
> 1) Put this in as a revbump since it was submitted upstream.

Where?
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-07-09 13:53:26 UTC
Sorry, not sure about that. I forgot the details on this bug.
Comment 8 Mattias Nissler 2012-07-09 19:20:39 UTC
I can't find my report to upstream in my mailbox either, but I have just verified that upstream doesn't include the patch.
Comment 9 SpanKY gentoo-dev 2012-07-15 22:50:01 UTC
(In reply to comment #3)

sounds fine
Comment 10 SpanKY gentoo-dev 2015-07-13 05:01:31 UTC
should be all set now in the tree; thanks for the report!

Commit message: Fix for mem leaks
http://sources.gentoo.org/sys-devel/bc/bc-1.06.95-r2.ebuild?rev=1.1
http://sources.gentoo.org/sys-devel/bc/files/bc-1.06.95-mem-leak.patch?rev=1.1