Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support fortss_t thread local objects in Objects.qll #877

Open
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-LowStandard-MISRA-C
@MichaelRFairhurst

Description

@MichaelRFairhurst

Objects.qll has support for identifying objects with different storage durations (static, thread local, allocated, and automatic). However, its thread local object support is limited to_Thread_local variables.

Ideally, atss_t variable would be recognizable as two objects:

  • One object representing the variable holding the tss_t key. Usually this is an object with static lifetime.
  • Another object identity for the thread local behind thetss_t.

Unfortunately,tss_t currently extendsElement, which means that it can't have two implementations of theObjectIdentity class. Alternatively, calls totss_get() could be consideredObjectIdentitys, however, that doesn't match the intention of theObjectIdentity class/library, as the threadlocal is really identified by thetss_t.

The threadlocal objectcould be identified by thetss_create call (similarly to how we identify dynamic memory viamalloc calls). But it probably makes more sense to haveObjectIdentity extendLocatable and then have atss_t variable produce twoObjectIdentys.

Otherwise the tss_t object class will closely match the malloc object class, since malloc returns a pointer to the dynamic memory just liketss_get() returns a pointer to the thread local. Additional refactoring to share code here will be required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-LowStandard-MISRA-C

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp