<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>31058</bug_id>
          
          <creation_ts>2009-11-03 06:52:59 -0800</creation_ts>
          <short_desc>[Qt] QWebSettings using unitialized values</short_desc>
          <delta_ts>2009-11-16 05:55:31 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>daniel.teske</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hausmann</cc>
    
    <cc>jturcotte</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>160055</commentid>
    <comment_count>0</comment_count>
    <who name="">daniel.teske</who>
    <bug_when>2009-11-03 06:52:59 -0800</bug_when>
    <thetext>The QWebSettings(WebCore::Settings* settings) ctor does access unitialized values. The current code:

QWebSettings::QWebSettings(WebCore::Settings* settings)
    : d(new QWebSettingsPrivate(settings))
{
    d-&gt;settings = settings;
    d-&gt;apply();
    allSettings()-&gt;append(d);
}


does not correctly initialize d-&gt;printingMinimumShrinkFactor  d-&gt;printingMaximumShrinkFactor and d-&gt;offlineStorageDefaultQuota, since the QWebSettingsPrivate ctor also does not set those values.

But the inside QWebSettignsPrivate::apply() d-&gt;printingMinimumShrinkFactor and d-&gt;printingMaximumShrinkFactor are accessed. This generates the following valgrind warnings:


  40: ==10098== Conditional jump or move depends on uninitialised value(s) 
   41: ==10098==    at 0x9D04BB9: QWebSettingsPrivate::apply() (in /home/apoenitz/dev/qt-4.6/lib/libQtWebKitMyns.so.4.6.0) 
   42: ==10098==    by 0x9D0591A: QWebSettings::QWebSettings(WebCore::Settings*) (in /home/apoenitz/dev/qt-4.6/lib/libQtWebKitMyns.so.4.6.0) 
   43: ==10098==    by 0x9CF16AF: QWebPagePrivate::QWebPagePrivate(QWebPage*) (in /home/apoenitz/dev/qt-4.6/lib/libQtWebKitMyns.so.4.6.0) 
   44: ==10098==    by 0x9CF19FE: QWebPage::QWebPage(myns::QObject*) (in /home/apoenitz/dev/qt-4.6/lib/libQtWebKitMyns.so.4.6.0) 
   45: ==10098==    by 0x93E6B65: HelpPage::HelpPage(Help::Internal::CentralWidget*, myns::QHelpEngine*, myns::QObject*) (helpviewer.cpp:171) 
   46: ==10098==    by 0x93E6D0D: HelpViewer::HelpViewer(myns::QHelpEngine*, Help::Internal::CentralWidget*) (helpviewer.cpp:240) 
   47: ==10098==    by 0x93C03E4: Help::Internal::HelpPlugin::createRightPaneSideBar() (helpplugin.cpp:494) 
   48: ==10098==    by 0x93C60E1: Help::Internal::HelpPlugin::initialize(myns::QStringList const&amp;, myns::QString*) (helpplugin.cpp:408) 
   49: ==10098==    by 0x40469F6: ExtensionSystem::Internal::PluginSpecPrivate::initializePlugin() (pluginspec.cpp:827) 
   50: ==10098==    by 0x403EF99: ExtensionSystem::Internal::PluginManagerPrivate::loadPlugin(ExtensionSystem::PluginSpec*, ExtensionSystem::PluginSpec::State) (pluginmanager.cpp:677) 
   51: ==10098==    by 0x403FE8E: ExtensionSystem::Internal::PluginManagerPrivate::loadPlugins() (pluginmanager.cpp:582) 
   52: ==10098==    by 0x404000F: ExtensionSystem::PluginManager::loadPlugins() (pluginmanager.cpp:246) 
   53: ==10098==  Uninitialised value was created by a heap allocation 
   54: ==10098==    at 0x40269EE: operator new(unsigned int) (vg_replace_malloc.c:224) 
   55: ==10098==    by 0x9D058E5: QWebSettings::QWebSettings(WebCore::Settings*) (in /home/apoenitz/dev/qt-4.6/lib/libQtWebKitMyns.so.4.6.0) 
   56: ==10098==    by 0x9CF16AF: QWebPagePrivate::QWebPagePrivate(QWebPage*) (in /home/apoenitz/dev/qt-4.6/lib/libQtWebKitMyns.so.4.6.0) 
   57: ==10098==    by 0x9CF19FE: QWebPage::QWebPage(myns::QObject*) (in /home/apoenitz/dev/qt-4.6/lib/libQtWebKitMyns.so.4.6.0) 
   58: ==10098==    by 0x93E6B65: HelpPage::HelpPage(Help::Internal::CentralWidget*, myns::QHelpEngine*, myns::QObject*) (helpviewer.cpp:171) 
   59: ==10098==    by 0x93E6D0D: HelpViewer::HelpViewer(myns::QHelpEngine*, Help::Internal::CentralWidget*) (helpviewer.cpp:240) 
   60: ==10098==    by 0x93C03E4: Help::Internal::HelpPlugin::createRightPaneSideBar() (helpplugin.cpp:494) 
   61: ==10098==    by 0x93C60E1: Help::Internal::HelpPlugin::initialize(myns::QStringList const&amp;, myns::QString*) (helpplugin.cpp:408) 
   62: ==10098==    by 0x40469F6: ExtensionSystem::Internal::PluginSpecPrivate::initializePlugin() (pluginspec.cpp:827) 
   63: ==10098==    by 0x403EF99: ExtensionSystem::Internal::PluginManagerPrivate::loadPlugin(ExtensionSystem::PluginSpec*, ExtensionSystem::PluginSpec::State) (pluginmanager.cpp:677) 
   64: ==10098==    by 0x403FE8E: ExtensionSystem::Internal::PluginManagerPrivate::loadPlugins() (pluginmanager.cpp:582) 
   65: ==10098==    by 0x404000F: ExtensionSystem::PluginManager::loadPlugins() (pluginmanager.cpp:246)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161628</commentid>
    <comment_count>1</comment_count>
      <attachid>42763</attachid>
    <who name="Manish Gupta">manish.5.gupta</who>
    <bug_when>2009-11-09 10:04:39 -0800</bug_when>
    <thetext>Created attachment 42763
Providing Initialization of variables in constructor</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161874</commentid>
    <comment_count>2</comment_count>
      <attachid>42763</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-11-09 17:50:03 -0800</bug_when>
    <thetext>Comment on attachment 42763
Providing Initialization of variables in constructor

This does not comply with teh webkit style guide.  http://webkit.org/coding/coding-style.html

Please run check-webkit-style against the file or the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>162059</commentid>
    <comment_count>3</comment_count>
      <attachid>42868</attachid>
    <who name="Manish Gupta">manish.5.gupta</who>
    <bug_when>2009-11-10 08:30:29 -0800</bug_when>
    <thetext>Created attachment 42868
initialization of variables in constructor, webkit compliant code style</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>162639</commentid>
    <comment_count>4</comment_count>
      <attachid>42868</attachid>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2009-11-11 13:08:07 -0800</bug_when>
    <thetext>Comment on attachment 42868
initialization of variables in constructor, webkit compliant code style

Good catch!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>162890</commentid>
    <comment_count>5</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2009-11-12 06:09:39 -0800</bug_when>
    <thetext>This is a duplicate of bug #30755.
Both bugs have proposed patches so I&apos;m not in position of knowing which one should be closed as duplicate.

Also note that both submitted patches depends on changes of bug #29042 which have been reverted to be postponed to 4.7.

Please consider it before committing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>162893</commentid>
    <comment_count>6</comment_count>
      <attachid>42868</attachid>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2009-11-12 06:37:16 -0800</bug_when>
    <thetext>Comment on attachment 42868
initialization of variables in constructor, webkit compliant code style

The code was been reverted, so marking r-.

I also noticed these issues yesterday due to crashes in the DRT, but didn&apos;t review this patch as Benjamin and me decided to revert the patch introducing the change instead,</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>163971</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2009-11-16 05:55:31 -0800</bug_when>
    <thetext>Closing this bug as rolling out the original patch also fixed this UMR.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>42763</attachid>
            <date>2009-11-09 10:04:39 -0800</date>
            <delta_ts>2009-11-10 08:30:29 -0800</delta_ts>
            <desc>Providing Initialization of variables in constructor</desc>
            <filename>bug31058.patch</filename>
            <type>text/plain</type>
            <size>1054</size>
            <attacher name="Manish Gupta">manish.5.gupta</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9xdC9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0L3F0L0NoYW5n
ZUxvZwkocmV2aXNpb24gNTA2NjApCisrKyBXZWJLaXQvcXQvQ2hhbmdlTG9nCSh3b3JraW5nIGNv
cHkpCkBAIC0xLDMgKzEsMTMgQEAKKzIwMDktMTEtMDkgIEd1cHRhIE1hbmlzaCAgPE1hbmlzaC41
Lmd1cHRhQG5va2lhLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4K
KworICAgICAgICBbUXRdIFFXZWJTZXR0aW5ncyB1c2luZyB1bmluaXRpYWxpemVkIHZhbHVlcwor
ICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MzEwNTgKKwor
ICAgICAgICAqIEFwaS9xd2Vic2V0dGluZ3MuY3BwOgorICAgICAgICAoUVdlYlNldHRpbmdzUHJp
dmF0ZTo6UVdlYlNldHRpbmdzUHJpdmF0ZSk6CisKIDIwMDktMTEtMDkgIExhc3psbyBHb21ib3Mg
IDxsYXN6bG8uMS5nb21ib3NAbm9raWEuY29tPgogCiAgICAgICAgIFJldmlld2VkIGJ5IEtlbm5l
dGggQ2hyaXN0aWFuc2VuLgpJbmRleDogV2ViS2l0L3F0L0FwaS9xd2Vic2V0dGluZ3MuY3BwCj09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT0KLS0tIFdlYktpdC9xdC9BcGkvcXdlYnNldHRpbmdzLmNwcAkocmV2aXNpb24gNTA2
NTUpCisrKyBXZWJLaXQvcXQvQXBpL3F3ZWJzZXR0aW5ncy5jcHAJKHdvcmtpbmcgY29weSkKQEAg
LTUyLDYgKzUyLDggQEAgcHVibGljOgogICAgIFFXZWJTZXR0aW5nc1ByaXZhdGUoV2ViQ29yZTo6
U2V0dGluZ3MqIHdjU2V0dGluZ3MgPSAwKQogICAgICAgICA6IHNldHRpbmdzKHdjU2V0dGluZ3Mp
CiAgICAgeworICAgICAgICBwcmludGluZ01pbmltdW1TaHJpbmtGYWN0b3I9MC4wZjsKKyAgICAg
ICAgcHJpbnRpbmdNYXhpbXVtU2hyaW5rRmFjdG9yPTAuMGY7CiAgICAgfQogCiAgICAgUUhhc2g8
aW50LCBRU3RyaW5nPiBmb250RmFtaWxpZXM7Cg==
</data>
<flag name="review"
          id="24332"
          type_id="1"
          status="-"
          setter="eric"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>42868</attachid>
            <date>2009-11-10 08:30:29 -0800</date>
            <delta_ts>2009-11-12 06:37:15 -0800</delta_ts>
            <desc>initialization of variables in constructor, webkit compliant code style</desc>
            <filename>bug31058.patch</filename>
            <type>text/plain</type>
            <size>1054</size>
            <attacher name="Manish Gupta">manish.5.gupta</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9xdC9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0L3F0L0NoYW5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Dogc2V0dGluZ3Mod2NTZXR0aW5ncykKKyAgICAgICAgLCBwcmludGluZ01p
bmltdW1TaHJpbmtGYWN0b3IoMC4wZikKKyAgICAgICAgLCBwcmludGluZ01heGltdW1TaHJpbmtG
YWN0b3IoMC4wZikKICAgICB7CiAgICAgfQogCg==
</data>
<flag name="review"
          id="24484"
          type_id="1"
          status="-"
          setter="kenneth"
    />
          </attachment>
      

    </bug>

</bugzilla>