[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konq-bugs
Subject:    [Bug 151336] KJS crashes when going to facebook.com signup page
From:       Bernhard Rosenkraenzer <bero () arklinux ! org>
Date:       2007-10-31 16:18:19
Message-ID: 20071031161819.14928.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=151336         




------- Additional Comments From bero arklinux org  2007-10-31 17:18 -------
I can't explain this at all, but...

Changing the code to

            if(m_codec->mibEnum() != 1000) {  // utf16
                    kdDebug(6005) << "m_codec->mibEnum() != 1000" << endl;
                // replace '\0' by spaces, for buggy pages
                char *d = const_cast<char *>(data);
                int i = len - 1;
                kdDebug(6005) << "i is " << i << endl;
                while(i >= 0) {
                        kdDebug(6005) << "i is now " << i << endl;
                        kdDebug(6005) << "d[i] is " << d[i] << endl;
                    if(d[i] == 0) {
                            d[i] = ' ';
                    }
                    i--;
                    kdDebug(6005) << "decremented i" << endl;
                    kdDebug(6005) << "i is now " << i << endl;
                }
                kdDebug(6005) << "i exited" << endl;
            }

Results in

khtml (encoding): m_codec->mibEnum() != 1000
khtml (encoding): i is 40
khtml (encoding): i is now 40
khtml (encoding): d[i] is >
KCrash: crashing... crashRecursionCounter = 2


Adding just another debug statement:

            if(m_codec->mibEnum() != 1000) {  // utf16
                    kdDebug(6005) << "m_codec->mibEnum() != 1000" << endl;
                // replace '\0' by spaces, for buggy pages
                char *d = const_cast<char *>(data);
                int i = len - 1;
                kdDebug(6005) << "i is " << i << endl;
                while(i >= 0) {
                        kdDebug(6005) << "i is now " << i << endl;
                        kdDebug(6005) << "d[i] is " << d[i] << endl;
                    if(d[i] == 0) {
                            kdDebug(6005) << "d[i] is 0" << endl;
                            d[i] = ' ';
                    }
                    i--;
                    kdDebug(6005) << "decremented i" << endl;
                    kdDebug(6005) << "i is now " << i << endl;
                }
                kdDebug(6005) << "i exited" << endl;
            }

makes the crash go away. At that point it just works, and even more strangely, the \
code path d[i] == 0 is never actually executed, there aren't any 0 characters in the \
string. _______________________________________________
Konq-bugs mailing list
Konq-bugs@mail.kde.org
https://mail.kde.org/mailman/listinfo/konq-bugs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic