-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


Tizen:

, 26 2017 . 11:51 +

PVS-Studio, Tizen, , Tizen. . , Tizen , . , .





, 3 :
  1. . 27000 Tizen. , . PVS-Studio , C/C++ .
  2. . Tizen. Tizen , PVS-Studio. , .
  3. . Tizen: C# . PVS-Studio . . , . C C++ . C# .

: Reddit, Hacker News. . :
, .

Rust


, Rust. "Rewrite the Linux kernel in Rust?".

. : , Rust.

 facepalm


, , - . C C++, 50 PVS-Studio . Cobol, C C++ .

, . Rust? 72 MLOC Rust? !

. , , , ! - - .

- , . . . , C C++ , , .

, , 72 MLOC , . , , , , .

3.3%


, . , 1000, 3000 10000 . , , . .

, ( PVS-Studio) 2 400 000 C/C++. ! .

. . , . :

alsa-lib-1.0.28, aspell-0.60.6.1, augeas-1.3.0, bind-9.11.0, efl-1.16.0, enlightenment-0.20.0, ise-engine-anthy-1.0.9, bluetooth-frwk-0.2.157, capi-appfw-application-0.5.5, capi-base-utils-3.0.0, capi-content-media-content-0.3.10, capi-maps-service-0.6.12, capi-media-audio-io-0.3.70, capi-media-codec-0.5.3, capi-media-image-util-0.1.15, capi-media-player-0.3.58, capi-media-screen-mirroring-0.1.78, capi-media-streamrecorder-0.0.10, capi-media-vision-0.3.24, capi-network-bluetooth-0.3.4, capi-network-http-0.0.23, cynara-0.14.10, e-mod-tizen-devicemgr-0.1.69, ise-engine-default-1.0.7, ise-engine-sunpinyin-1.0.10, ise-engine-tables-1.0.10, isf-3.0.186, org.tizen.app-selector-0.1.61, org.tizen.apps-0.3.1, org.tizen.bluetooth-0.1.2, org.tizen.browser-3.2.0, org.tizen.browser-profile_common-1.6.4, org.tizen.classic-watch-0.0.1, org.tizen.d2d-conv-setting-profile_mobile-1.0, org.tizen.d2d-conv-setting-profile_wearable-1.0, org.tizen.download-manager-0.3.21, org.tizen.download-manager-0.3.22, org.tizen.dpm-toolkit-0.1, org.tizen.elm-demo-tizen-common-0.1, org.tizen.indicator-0.2.53, org.tizen.inputdelegator-0.1.170518, org.tizen.menu-screen-1.2.5, org.tizen.myplace-1.0.1, org.tizen.privacy-setting-profile_mobile-1.0.0, org.tizen.privacy-setting-profile_wearable-1.0.0, org.tizen.quickpanel-0.8.0, org.tizen.screen-reader-0.0.8, org.tizen.service-plugin-sample-0.1.6, org.tizen.setting-1.0.1, org.tizen.settings-0.2, org.tizen.settings-adid-0.0.1, org.tizen.telephony-syspopup-0.1.6, org.tizen.voice-control-panel-0.1.1, org.tizen.voice-setting-0.0.1, org.tizen.volume-0.1.149, org.tizen.w-home-0.1.0, org.tizen.w-wifi-1.0.229, org.tizen.watch-setting-0.0.1, security-manager-1.2.17.

, . , .

, .

,


27000 errors in the Tizen operating system , , Tizen. , Tizen 27000 . , , . .

, , . , , Tizen . , , PVS-Studio , . .

. , , security weaknesses. , , . CWE. CWE is a community-developed list of common software security weaknesses https://cwe.mitre.org/.

CWE. . , . , CWE CVE. : https://cwe.mitre.org/about/faq.html.

, - . , , , .

27000 ? . , . , 72 500 000 C, C++ ( ). , PVS-Studio 0,37 1000 . 1 3000 .

. Tizen. , , , . , .

, PVS-Studio 0,37 1000 . ? , . . :
. . 27000 , Tizen. , .

, PVS-Studio Tizen. , . , . . : https://www.viva64.com/ru/inspections/


. , . , . . , 27000 , 900 , 3.3% . , , .

, :

900 Lint' 900 . , . , , .. .

, 900 .

. - , , NN.

, . . , .

Tizen. , . , .

: ?

. , , iOS Android. , . , . , , , , . , , Unreal Engine (. 1, 2).

, - , , . , , , . - . , .

, ? ! . C , . , . , , .

. :
  • , ( , ).
  • ( ).

Update. . , . . EFL Core Libraries , PVS-Studio 10-15% . : , - .

-Wall -Wextra -Werror


, , .

. , . .

, . , - , :
, , . PVS-Studio:
  • Visual Studio 2010-2017.
  • SonarQube.
  • BlameNotifier. , PVS-Studio .
  • Mass Suppression , 0 . . PVS-Studio .
  • : , , .
  • IncrediBuild.
  • Mark as False Alarm , .
  • () PVS-Studio: , , .
  • Excel , ..
  • PVS-Studio ( IDE, ).
  • .
  • CLMonitoring , Visual Studio (.sln/.vcxproj); CLMonitoring, PVS-Studio Makefile-based .
  • pvs-studio-analyzer CLMonitoring, Linux.
  • , .

.


, . , .

PVS-Studio B2B . , . - .

? , .

, :
.

, ,


, - . , , , , . , V730 Not all members of a class are initialized inside the constructor. , , - . , , .

. org.tizen.browser-profile_common-1.6.4.

BookmarkItem.
class BookmarkItem
{
public:
    BookmarkItem();
    BookmarkItem(
        const std::string& url,
        const std::string& title,
        const std::string& note,
        unsigned int dir = 0,
        unsigned int id = 0
        );
    virtual ~BookmarkItem();

    void setAddress(const std::string & url) { m_url = url; };
    std::string getAddress() const { return m_url; };

    void setTitle(const std::string & title) { m_title = title; };
    std::string getTitle() const { return m_title; };

    void setNote(const std::string& note){m_note = note;};
    std::string getNote() const { return m_note;};

    void setId(int id) { m_saved_id = id; };
    unsigned int getId() const { return m_saved_id; };

    ....
    ....

    bool is_folder(void) const { return m_is_folder; }
    bool is_editable(void) const { return m_is_editable; }

    void set_folder_flag(bool flag) { m_is_folder = flag; }
    void set_editable_flag(bool flag) { m_is_editable = flag; }

private:
    unsigned int m_saved_id;
    std::string m_url;
    std::string m_title;
    std::string m_note;
    std::shared_ptr m_thumbnail;
    std::shared_ptr m_favicon;
    unsigned int m_directory;
    std::vector m_tags;
    bool m_is_folder;
    bool m_is_editable;
};

m_is_folder m_is_editable. , . $10 , , . , , .

:
BookmarkItem::BookmarkItem()
: m_saved_id(0)
, m_url()
, m_title()
, m_note()
, m_thumbnail(std::make_shared<.....>())
, m_favicon(std::make_shared<.....>())
, m_directory(0)
, m_is_folder(false)
, m_is_editable(true)
{
}

BookmarkItem::BookmarkItem(
                const std::string& url,
                const std::string& title,
                const std::string& note,
                unsigned int dir,
                unsigned int id
                        )
: m_saved_id(id)
, m_url(url)
, m_title(title)
, m_note(note)
, m_directory(dir)
{
}

m_is_folder m_is_editable, . , .

PVS-Studio : V730. Not all members of a class are initialized inside the constructor. Consider inspecting: m_is_folder, m_is_editable. BookmarkItem.cpp 268

, PVS-Studio 64- . Tizen 32-, , .

  64-


, 64- . . , 32- . .

. :
int **PtrArray = (int **)malloc(Count * size_of(int));

int, . :
int **PtrArray = (int **)malloc(Count * size_of(int *));

32- . int , . 64- .

. , 64- int. , 32- . , . 32- 64-.

, 64- :
  1. 64-
  2. C++11 64-
  3. Undefined behavior ,
  4. 64- /++

Tizen capi-media-vision-0.3.24. 64- . PVS-Studio 11 V204:
  1. V204 Explicit conversion from 32-bit integer type to pointer type. mv_testsuite_common.c 94
  2. V204 Explicit conversion from 32-bit integer type to pointer type. mv_video_helper.c 103
  3. V204 Explicit conversion from 32-bit integer type to pointer type. mv_video_helper.c 345
  4. V204 Explicit conversion from 32-bit integer type to pointer type. mv_mask_buffer.c 39
  5. V204 Explicit conversion from 32-bit integer type to pointer type. mv_surveillance.c 52
  6. V204 Explicit conversion from 32-bit integer type to pointer type. mv_surveillance.c 134
  7. V204 Explicit conversion from 32-bit integer type to pointer type. mv_surveillance.c 172
  8. V204 Explicit conversion from 32-bit integer type to pointer type. surveillance_test_suite.c 452
  9. V204 Explicit conversion from 32-bit integer type to pointer type: (unsigned char *) malloc(buf_size) surveillance_test_suite.c 668
  10. V204 Explicit conversion from 32-bit integer type to pointer type: (unsigned char *) malloc(buf_size) surveillance_test_suite.c 998
  11. V204 Explicit conversion from 32-bit integer type to pointer type: (unsigned char *) malloc(buf_size) surveillance_test_suite.c 1109

:
*string = (char*)malloc(real_string_len * sizeof(char));

? , , malloc. , C- i-. malloc , .

, , . , , int.

.. , :
int malloc(int x);

32- . int .

64- . . .

, . . , . - . , , : " 64- ".

11 , . .

, PVS-Studio 64- ( ) . . , , , . 64- , . , 64- . (. " 9 64- ").

Tizen 64-, , .


. , PVS-Studio , (47 ): PVS-Studio static code analyzer for C, C++ and C#.

, :



, : Andrey KarpovDate: 26.07.2017. Tizen: Summing Up

Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/334172/


: [1] []
 

:
: 

: ( )

:

  URL