Sponsored Content
Full Discussion: Bizzare optimization problem
Top Forums Programming Bizzare optimization problem Post 302504755 by Corona688 on Tuesday 15th of March 2011 11:08:58 AM
Old 03-15-2011
That's the problem; so much as sneezing on this code causes this bug to not happen, and yet, I can't for the life of me see that I'm doing anything wrong. I've accounted for every single step along the way -- not difficult, as it happens extremely early in the program, in a completely innocuous place that uses no stack pointers at all. I've dug down and ferreted out stranger bugs before but this time, not even a gdb memory watch could determine when fd was being modified when it goes haywire -- it just said 'optimized out'... Like it suddenly decides to stop using the variable and just assume it's zero.

It works fine in gcc 4.4.4 with -O2 and -O3, so I suspect it really is that strange and wild thing, a compiler bug. Thanks for the suggestion fpmurphy. I'd better rebuild my system.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Bizzare (while statement)

I'm trying to use the while statement to increment a positive number, with a leading "0". when I pass it through, it seems to come out with a negative value, and all the increments remain negative. This is what I have: i=010986294184 j=010986988888 while ; do echo $i i=(($i + 1)) done... (8 Replies)
Discussion started by: Khoomfire
8 Replies

2. UNIX for Dummies Questions & Answers

Help on optimization of the script

Hi, I have prepared script which is taking more time to process. find below script and help me with fast optimized script:- cat name.txt | while read line do name=$(echo $line| awk '{print $8}') MatchRecord=$(grep $name abc.txt | grep -v grep ) echo "$line | $MatchRecord" | awk... (2 Replies)
Discussion started by: aju_kup
2 Replies

3. Programming

very bizzare file writing problem

I'm trying to write a function which opens a file pointer and writes one of the function parameters into the file, however for some reason Im getting a core dump error. The code is as below void WriteToFile(char *file_name, char *data) { FILE *fptr; /*disk_name_size is a... (10 Replies)
Discussion started by: JamesGoh
10 Replies

4. Shell Programming and Scripting

AWK optimization

Hello, Do you have any tips on how to optimize the AWK that gets the lines in the log between these XML tags? se2|6|<ns1:accountInfoRequest xmlns:ns1="http://www.123.com/123/ se2|6|etc2"> .... <some other tags> se2|6|</ns1:acc se2|6|ountInfoRequest> The AWK I'm using to get this... (2 Replies)
Discussion started by: majormark
2 Replies

5. Shell Programming and Scripting

sed optimization

I have a process using the following series of sed commands that works pretty well. sed -e 1,1d $file |sed 1i\\"EHLO Broadridge.com" |sed 2i\\"MAIL FROM:${eaddr}"|sed 3i\\"RCPT TO:${eaddr}"|sed 4i\\"DATA"|sed 5s/.FROM/FROM:/|sed 6s/.TO/TO:/|sed 7,7d|sed s/.ENDDATA/./|sed s/.ENDARRAY// >temp/$file... (1 Reply)
Discussion started by: njaiswal
1 Replies

6. IP Networking

Bizzare network attack?

A server I host is having very rare glitches where a file the user downloads will have incorrect contents. This almost never happens when I am looking, I caught it once and only once -- a user messaged me saying his antivirus had given him a warning about an image file downloaded from his... (2 Replies)
Discussion started by: Corona688
2 Replies

7. Shell Programming and Scripting

help with counting processes, bizzare behavior

I have a ksh script (dtksh Version M-12/28/93d on Solaris 10) that is run daily by cron and sometime hangs forever. I need to detect if there is an old copy hung before I start the new run, and if so send an email and exit the script. Here is part of the code: #!/usr/dt/bin/dtksh... (4 Replies)
Discussion started by: 73rdUserID
4 Replies

8. UNIX for Advanced & Expert Users

Bizzare TCP/IP problem

Hi all. I have a really really weird problem that I've been working on for days. The problem manifested as users cannot connect to our web servers via SSH when they're using our wireless network. Here's where it gets weird: - Clients from anywhere other than the wireless subnet can... (4 Replies)
Discussion started by: pileofrogs
4 Replies

9. Shell Programming and Scripting

Bizzare behavior on redirect of stdout

Oracle Linux 5.6 64-bit (derivative of RHEL) Dear Ann Landers, This is about as bizarre as anything I've ever seen. I have a little test script I've been working with. When I redirect stdout to a file, no file. Make a copy of the script to another name. Execute it and redirect stdout, and... (4 Replies)
Discussion started by: edstevens
4 Replies
HARDENED-CC(1)							 Debian GNU/Linux						    HARDENED-CC(1)

NAME
hardened-cc - gcc wrapper to enforce hardening toolchain improvements SYNOPSIS
export DEB_BUILD_HARDENING=1 gcc ... DESCRIPTION
The hardened-cc wrapper is normally used by calling gcc as usual when DEB_BUILD_HARDENING is set to 1. It will configure the necessary toolchain hardening features. By default, all features are enabled. If a given feature does not work correctly and needs to be disabled, the corresponding environment variables mentioned below can be set to 0. ENVIRONMENT
DEB_BUILD_HARDENING=1 Enable hardening features. DEB_BUILD_HARDENING_DEBUG=1 Print the full resulting gcc command line to STDERR before calling gcc. DEB_BUILD_HARDENING_STACKPROTECTOR=0 Disable stack overflow protection. See README.Debian for details. DEB_BUILD_HARDENING_RELRO=0 Disable read-only linker sections. See README.Debian for details. DEB_BUILD_HARDENING_FORTIFY=0 Don't fortify several standard functions. See README.Debian for details. DEB_BUILD_HARDENING_PIE=0 Don't build position independent executables. See README.Debian for details. DEB_BUILD_HARDENING_FORMAT=0 Disable unsafe format string usage errors. See README.Debian for details. NOTES
System-wide settings can be added to /etc/hardening-wrapper.conf, one per line. The real gcc symlinks are renamed gcc.real, and a diversion is registered with dpkg-divert(1). Thus hardened-cc's idea of the default gcc is dictated by whatever package installed /usr/bin/gcc. SEE ALSO
hardened-ld(1) gcc(1) Debian Project 2008-01-08 HARDENED-CC(1)
All times are GMT -4. The time now is 12:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy