Sponsored Content
Operating Systems Linux Red Hat Free() corrupted unsorted chunks Post 302843630 by Don Cragun on Wednesday 14th of August 2013 08:28:48 AM
Old 08-14-2013
There is nothing magical about a bad pointer problem going undetected for years. Depending on what the problem is, the same source code built using a different compiler, running on different hardware, or even running it at a different time of day may mask a problem until the right sequence of events happens in your program to expose the problem. 99.44% of the time (at least in my experience looking at bug reports against Solaris systems), the bug is in your code. The rest of the time, it may be a bug in the kernel, in a system library, or a hardware problem.

Without carefully analyzing your code, there is no way to guess at what the problem might be. You basically need to look at every line of code that allocates space, every line of code that uses a pointer (or an array subscript), and every line of code that frees space to verify that the pointer/array subscript is in bounds for the space allocated to that space/array) and that allocated space is not referenced after it is freed.

If you show us your code, we might spot the problem in seconds, or we might never figure it out. If you don't show us your code, there isn't anything we can do to help you other than suggest that you set breakpoints in your code, dump variables that seem to be corrupted, and add debugging statements until you identify the problem and fix it. But, be aware that adding a line of debugging code can easily change the way your program runs just enough to hide a problem. I.e., debugging bad pointers can be really hard.

You have not said anything yet that sounds like there was a bug on your old Solaris system nor that there is a bug on your new Linux system (although subtle differences in the ways functions are defined to behave on the two systems may well be your problem).
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove chunks of text from file

All, So, I have an ldif file that contains about 6500 users worth of data. Some users have a block of text I'd like to remove, while some don't. Example (block of text in question is the block starting with "authAuthority: ;Kerberosv5"): User with text block: # username, users,... (7 Replies)
Discussion started by: staze
7 Replies

2. Shell Programming and Scripting

Comparing two unsorted files

Hi Guys, I'm a complete shell scripting newbie and need some help with comparing a file against a master file and outputting the results. master.txt would look something like this: 000123 000345 000341 000927 000762 000235 000155 000452 000846 000623 file.txt would look like... (1 Reply)
Discussion started by: ven
1 Replies

3. Shell Programming and Scripting

onstat -d chunks perl monitor

I have a file I need to monitor with a perl script with the following format. I need to send off a 0 if it is above 95 in the 5th colum and a 1 if it is below. Any help on a simple perl script would be great. 75424958 999975 983170 /dev/rmetrochunk00 98.32 760c2dd8 ... (3 Replies)
Discussion started by: jlaigo2
3 Replies

4. Shell Programming and Scripting

Combining chunks of data

Hi there! Need help on some issue, I have data like this: 123 456 789 012 i need it to be like this: 123789 456012 Anyone has any idea how to do this? Thanks! Regards, Ken How to use code tags (8 Replies)
Discussion started by: kennethtls
8 Replies

5. Shell Programming and Scripting

Comparing two large unsorted csv files

Hi All, My requirement is to write a shell script to compare two large csv files. I've created sample files for explaining my problem i.e., a.csv and b.csv contents of files: ----------------- a.csv ------ Type,Memory (Kb),Location HD,Size (Mb),Serial # XT,640,D402,0,MG0010... (2 Replies)
Discussion started by: vasavi
2 Replies

6. Shell Programming and Scripting

Splitting a file into chunks of 1TB

Hi I have a file with different filesystems with there sizes. I need to split them in chucks of 1TB. The file looks like vf_MTLHQNASF07_Wkgp2 187428400 10601AW1 vf_MTLHQNASF07_Wkgp2 479504596 10604AW1 vf_MTLHQNASF07_Wkgp2 19940 10605AID vf_MTLHQNASF07_Wkgp2 1242622044... (4 Replies)
Discussion started by: bombcan
4 Replies

7. Shell Programming and Scripting

Chunks of bash shell programming

I am going to provide a chunks of codes that I do not understand. Please help with them in a layman's terms. 1) ${DEBUG:-0} -------------------------------------------------------------------------- 2) print "${1}" ... (7 Replies)
Discussion started by: lg123
7 Replies

8. Shell Programming and Scripting

Compare two unsorted unequal files extracted from xml

I have two files for comparison which are extracts from set of xml files. file1 has: Comparing File: BRCSH1to320140224CC3.xml :: TZZZ:BR :: TAZZ:OUT UIZZ:0 :: ERAZ:1.000000 UIZZ:0 :: CTZZ:B UIZZ:0 :: CCAZ:MYR Comparing File: BRMY20140224CC18REG013SPFNSY13.xml :: TZZZ:BR :: TAZZ:INB... (1 Reply)
Discussion started by: vamsi gunda
1 Replies

9. Shell Programming and Scripting

Move files from one directory to another in chunks

All, I have an application that is not working properly and the company is 'in the process' of fixing it. In the meantime, I want to write a bash script work-around. However, what I thought was going to be simple is seemingly not. Need: - Move files from one directory to another in... (3 Replies)
Discussion started by: hburnswell
3 Replies

10. UNIX for Beginners Questions & Answers

Perl: Can someone please explain this code "sort { $a <=> $b } @unsorted"

@sorted = sort { $a <=> $b } @unsorted; I am having hard time understanding how this works? I know the output but interested to know the working. Thanks in advance. (2 Replies)
Discussion started by: Tanu
2 Replies
flea(1) 							   User Manuals 							   flea(1)

NAME
flea - Report a bug (or rather a flea) in mutt. SYNOPSIS
flea DESCRIPTION
flea is a shell script which helps you to submit a bug report against the mutt(1) mail user agent. If you invoke flea, you'll first be prompted for a short description of the problem you experience. This will be used as the bug report's subject line, so it should be concise, but informative. You are then asked to assign an initial severity level to the problem you observe; flea will give you a description which severity level is appropriate or not. Then, you are asked for the location of a core dump (normally named core) which may have been left over by a crash of your mutt(1). You can just type "no" here, or you can enter the path leading to a core dump. flea will try to use either sdb(1), dbx(1), or gdb(1) to extract some information from this core dump which may be helpful to developers in order to determine the reason for the crash. Finally, you are asked whether or not you want to include personal and system mutt(1) configuration files with the bug report. If at all possible, we urge you to answer these questions with "yes", since a reference configuration makes it incredibly easier to track down a problem. If you are using Debian GNU/Linux, flea will now check whether or not mutt has been installed as a Debian package on your system, and sug- gest to file the bug against the mutt(1) and Debian bug tracking systems. This option was added since the mutt(1) project uses another instantiation of the Debian bug tracking system, so submitting bugs against both systems in one pass is simple. You are then dropped into your favorite editor as determined by the EDITOR and VISUAL environment variables. Please give us details about the problem in the empty space below the line reading "Please type your report below this line". We are most interested in precise information on what symptoms you observe and what steps may be used to reproduce the bug. Chances are that problems which can easily be reproduced will be fixed quickly. So please take some time when filling out this part of the template. The remainder of the template contains various kinds of information gathered from your system, including output of the uname(1) command, output from mutt(1) itself, and your system's mutt(1) configuration files. You may wish to browse through this part of the bug report form in order to avoid leaking confidential information to the public. If you leave the editor, flea will give you the option to review, re-edit, submit, or abandon your bug report. If you decide to submit it, a mail message containing your report will be sent to <submit@bugs.guug.de>. You'll receive a copy of this message. While your bug report is being processed by the bug tracking system, you will receive various e-mail messages from the bug tracking system informing you about what's going on: Once your bug report has been entered into the bug tracking system, it will be assigned a unique serial number about which you are informed via e-mail. If you wish to submit additional information about the bug, you can just send it to the address serial@bugs.guug.de. Later, you will most likely receive questions from the developers about the problem you observed, and you will eventually be informed that your bug report has been closed. This means that the bug has been fixed at least in the cvs(1) repository. If the answers you receive don't satisfy you, don't hesitate to contact the developers directly under mutt-dev@mutt.org. You can also browse your bug report and all additional information and replies connected to it using the bug tracking system's Web inter- face under the following URL: http://bugs.guug.de/ ENVIRONMENT
flea will use the following environment variables: EMAIL Your electronic mail address. Will be used to set the bug report's From header, and to send you a copy of the report. LOGNAME Your login name. If the EMAIL environment variable isn't set, this will be used instead to send you a copy of the report. Setting the sender will be left to sendmail(1) on your system. REPLYTO If set, the bug report will contain a Reply-To header with the e-mail address contained in this environment variable. ORGANIZATION If set, the bug report will contain an Organization header with the contents of this environment variable. PAGER If set, this environment variable will be expected to contain the path to your favorite pager for viewing the bug report. If unset, more(1) will be used. VISUAL If set, this environment variable will be expected to contain the path to your favorite visual editor. EDITOR If set, this environment variable will be expected to contain the path to your favorite editor. This variable is examined if and only if the VISUAL environment variable is unset. If EDITOR is unset, vi(1) will be used to edit the bug report. FILES
core If present, this file may contain a post-mortem memory dump of mutt. It will be inspected using the debugger installed on your sys- tem. SEE ALSO
dbx(1), gdb(1), lynx(1), mutt(1), muttrc(5), sdb(1), sendmail(1), uname(1), vi(1) The mutt bug tracking system: http://bugs.guug.de/ AUTHOR
flea and this manual page were written by Thomas Roessler <roessler@does-not-exist.org>. Unix July 2000 flea(1)
All times are GMT -4. The time now is 04:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy