LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-22-2007, 01:03 PM   #1
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Rep: Reputation: 30
glibc reports malloc error when using Firefox under Slackware 11.0


I want to report the error/bug shown below but I'm not sure whether it is related to Firefox or Slackware. I tried using a new Firefox build from Mozilla with a new profile and yet Firefox crashes. Here is the error line:
Code:
*** glibc detected *** malloc(): memory corruption: 0x0a271520 ***
Here is the steps to reproduce it(Slackware 11.0, Firefox 2.0.0.1 and Firebug 1.0.1):
1. save the following code as myOwnJavascript.html
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
    <head>
        <script type="text/javascript" src="myOwnJavaScript.js"
    </head>
    <body>
        <form id="addressForm">
            <label for="dest">Shipping Destination:</label>
            <select id="dest">
                <option>Boston</option>
                <option>Seoul</option>
            </select>
            <br /><br />
            <label for="type">Shipping Type:</label>
            <select id="type">
                <option>Express Delivery</option>
                <option>Standard Delivery</option>
            </select>
            <br /><br />
            <label for="name">Receiver's name:</label>
            <input type="text" id="name" value="" />
            <br /><br />
            <label for="email">Receiver's email address:</label>
            <input type="text" id="email" value="" />
            <br /><br />
            <input type="submit" value="Confirm Address" onclick="return validateForm(this.form)" />
        </form>
        <div id="myOwndivElement"></div>
    </body>
</html>
2. save the following code as myOwnJavascript.js
Code:
function ShippingInfo(dest, type, name, email){
    this.DestinationAddress = dest;
    this.ShippingType = type;
    this.ReceiverName = name;
    this.ReceiverEmail = email;
    
    GetShippingCost = GetCost;
}

function GetCost(){
    if(DestinationAddress == "Boston" && ShippingType == "Standard Delivery")
        return 100;
    if(DestinationAddress == "Boston" && ShippingType == "Express Delivery")
        return 200;
    if(DestinationAddress == "Seoul" && ShippingType == "Standard Delivery")
        return 500;
    if(DestinationAddress == "Seoul" && ShippingType == "Express Delivery")
        return 1000;
}

function prepareForms(){
    for(var i = 0; i < document.forms.length; i++){
        var thisform = document.forms[i];
        thisform.onsubmit = function(){
            return validateForm(this);
        }
    }
}

function validateForm(form){
    var valid = true;
    var dest = form["dest"];
    if(!isFilled(dest)){
        alert("Please select a shipping destination.");
        valid = false;
    }
    var type = form["type"];
    if(!isFilled(type)){
        alert("Please select a shipping type.");
        valid = false;
    }
    var name = form["name"]
    if(!isValidName(name)){
        alert("The name has to start with 'Receiver'");
        valid = false;
    }
    var email = form["email"];
    if(!isEmail(email)){
        alert("Please enter a valid email address.");
        valid = false;
    }
    if(valid){
        info = new ShippingInfo(dest.value, type.value, name.value, email.value)
        cost = info.GetShippingCost()
        div = document.getElementById("myOwndivElement");
        txt = document.createTextNode(cost);
        div.appendChild(txt)
    }
    
}

function isFilled(field){
    if(field.value.length < 1 || field.value == field.defaultValue)
        return false;
    return true;
}

function isEmail(field){
    if(field.value.indexOf("@") == -1 || field.value.indexOf(".") == -1)
        return false
        return true;
}

function isValidName(field){
    if(field.value.indexOf("Receiver") == -1)
        return false;
    return true;
}
3. Run the myOwnJavascript.html file
4. Tools --> Firebug --> Open Firebug
5. Select the 'Script' tag and place a breakpoint at line 54
6. Enter 'Receiver' for the name and any email address
7. Click the 'Confirm Address' button
8. When stopped at line 54 click F11 to Step Into.

At this point you should get the glibc malloc and firefox should crash.
 
Old 02-22-2007, 03:46 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
The firefox that comes with my Slack 11 doesn't have an option firebug
in tools ....



Cheers,
Tink
 
Old 02-23-2007, 12:09 AM   #3
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Original Poster
Rep: Reputation: 30
It is an Add-on to edit, debug, and monitor CSS, HTML, and JavaScript. You can get it from here:
http://www.getfirebug.com/ or https://addons.mozilla.org/firefox/1843/
 
Old 02-23-2007, 02:27 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Heh. I don't even use firefox, and I'm not eager enough to help
you to download add-ons for firefox :} ... sorry.


Cheers,
Tink
 
Old 04-23-2007, 08:08 AM   #5
pete_bogg
Member
 
Registered: Aug 2003
Location: Kentucky
Distribution: Ubuntu 9.10
Posts: 153

Rep: Reputation: 30
I've had the same problem while using Zenwalk 2.8 through 4.4.1. The crashes got so bad that I decided to come back to Slackware. (Slackware 10.0 was solid, but was getting somewhat dated.)

Last night I installed Slackware 11.0. (I used the xfs.s kernel.) Tried a Firefox session and it crashed. Tried a Seamonkey sesson and it crashed too.

I hope this issue goes away with Slackware 12.0.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
*** glibc detected *** malloc() / free()/ double RohanShrivastav Programming 12 10-01-2012 11:08 AM
*** glibc detected *** malloc(): memory corruption arvind.ayyangar Programming 2 11-21-2006 12:59 AM
malloc error: glibc vdhussa Linux - General 10 05-31-2006 10:47 AM
glibc detected *** malloc(): memory corruption: abefroman Linux - Software 2 04-12-2006 01:12 PM
Firefox 1.5 on Mandriva 2006 powerpack glibc error wearetheborg Mandriva 2 12-20-2005 04:07 PM


All times are GMT -5. The time now is 03:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration