Bug 562155 - Access to stringdict should be mutexed
Summary: Access to stringdict should be mutexed
Status: NEW
Alias: None
Product: 4DIAC
Classification: IoT
Component: FORTE (show other bugs)
Version: 1.12.0   Edit
Hardware: PC Windows 10
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-15 05:08 EDT by Jose Maria Jesus Cabral Lassalle CLA
Modified: 2020-04-15 05:08 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Maria Jesus Cabral Lassalle CLA 2020-04-15 05:08:08 EDT
I'm not sure where exactly, but at least in the insert function, when two resources try to insert the same string, they could add the string twice.

A problem might arise in the local layer where:

EComResponse CLocalComLayer::openConnection(char *pa_acLayerParameter){
   CStringDictionary::TStringId nId = CStringDictionary::getInstance().insert(pa_acLayerParameter);

  switch (m_poFb->getComServiceType()){
    case e_Server:
    case e_Client:
      break;
    case e_Publisher:
      m_poLocalCommGroup = sm_oLocalCommGroupsManager.registerPubl(nId, this);
      break;
    case e_Subscriber:
      m_poLocalCommGroup = sm_oLocalCommGroupsManager.registerSubl(nId, this);
      break;
  }

And the returned nId will be different, creating two different groups for the same string

I spotted this issue while seeing that the PUBL was being triggered constantly, and its corresponding SUBL (already initialized) didn't get any IND