[tickets] [opensaf:tickets] #3332 rde: incorrect use of pointer

2023-04-20 Thread Nguyen Quoc Khanh via Opensaf-tickets
- **status**: review --> fixed



---

** [tickets:#3332] rde: incorrect use of pointer**

**Status:** fixed
**Milestone:** 5.23.07
**Created:** Mon Mar 27, 2023 06:47 AM UTC by Gary Lee
**Last Updated:** Thu Apr 20, 2023 07:57 AM UTC
**Owner:** Nguyen Quoc Khanh


In rda_papi.cc, there is a use after free.

if (m_NCS_TASK_START(rda_callback_cb->task_handle) != NCSCC_RC_SUCCESS) {
  m_NCS_MEM_FREE(rda_callback_cb, 0, 0, 0);
  m_NCS_TASK_RELEASE(rda_callback_cb->task_handle);
  rc = PCSRDA_RC_TASK_SPAWN_FAILED;
  break;
}


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] #3332 rde: incorrect use of pointer

2023-04-20 Thread Nguyen Quoc Khanh via Opensaf-tickets
commit c4f06acee858127367cc72ecce3ff7e1edacdcdd (HEAD -> develop, 
origin/develop)
Author: khanh.q.nguyen1 
Date:   Mon Apr 17 13:48:16 2023 +0700

evt: fix pointer used after free [#3332]

This fix moves the free function to a more appropriate position.


---

** [tickets:#3332] rde: incorrect use of pointer**

**Status:** review
**Milestone:** 5.23.07
**Created:** Mon Mar 27, 2023 06:47 AM UTC by Gary Lee
**Last Updated:** Mon Apr 17, 2023 07:13 AM UTC
**Owner:** Nguyen Quoc Khanh


In rda_papi.cc, there is a use after free.

if (m_NCS_TASK_START(rda_callback_cb->task_handle) != NCSCC_RC_SUCCESS) {
  m_NCS_MEM_FREE(rda_callback_cb, 0, 0, 0);
  m_NCS_TASK_RELEASE(rda_callback_cb->task_handle);
  rc = PCSRDA_RC_TASK_SPAWN_FAILED;
  break;
}


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] #3333 rde: Valgrind reported errors

2023-04-20 Thread PhanTranQuocDat via Opensaf-tickets
- **status**: review --> fixed
- **Comment**:

commit a1fcc05d5efc497c2aab3ec52ff697167c43c224
Author: dat.tq.phan 
Date:   Tue Mar 28 10:22:14 2023 +0700

rde: fix errors reported by Valgrind [#]

Fix memleak detected by Valgrind when receive rde message.
Also fix the uninitialized value(s).



---

** [tickets:#] rde: Valgrind reported errors**

**Status:** fixed
**Milestone:** 5.23.07
**Created:** Tue Mar 28, 2023 02:51 AM UTC by PhanTranQuocDat
**Last Updated:** Thu Apr 20, 2023 07:14 AM UTC
**Owner:** PhanTranQuocDat


Valgrind detected memleak when receive rde message:
==196== 177,584 (1,232 direct, 176,352 indirect) bytes in 22 blocks are 
definitely lost in loss record 81 of 81
==196==at 0x483B7F3: malloc (in 
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==196==by 0x48ADCF0: sysf_alloc_pkt (sysf_mem.c:429)
==196==by 0x489CD15: ncs_enc_init_space_pp (hj_ubaid.c:144)
==196==by 0x48CAF38: mdtm_fill_data (mds_dt_common.c:1454)
==196==by 0x48CAF38: mdtm_fill_data (mds_dt_common.c:1442)
==196==by 0x48CC0C0: mdtm_process_recv_message_common (mds_dt_common.c:544)
==196==by 0x48CC5F8: mdtm_process_recv_data (mds_dt_common.c:1126)
==196==by 0x48D71E7: mdtm_process_recv_events (mds_dt_tipc.c:1144)
==196==by 0x4B5A608: start_thread (pthread_create.c:477)
==196==by 0x4C94132: clone (clone.S:95)

Also, uninitialized value(s):
==351== Conditional jump or move depends on uninitialised value(s)
==351==at 0x50541FB: ava_fill_comp_reg_msg (ava_mds.cc:1310)
==351==by 0x50497D0: AmfAgent::ComponentRegister(unsigned long long, 
SaNameT const*, SaNameT const*) (amf_agent.cc:559)
==351==by 0x10E940: rde_amf_init(RDE_AMF_CB*) (rde_amf.cc:186)
==351==by 0x10DAAE: main (rde_main.cc:458)
==351==  Uninitialised value was created by a stack allocation
==351==at 0x10E743: rde_amf_init(RDE_AMF_CB*) (rde_amf.cc:140)


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets


[tickets] [opensaf:tickets] #3333 rde: Valgrind reported errors

2023-04-20 Thread PhanTranQuocDat via Opensaf-tickets
- **status**: assigned --> review



---

** [tickets:#] rde: Valgrind reported errors**

**Status:** review
**Milestone:** 5.23.07
**Created:** Tue Mar 28, 2023 02:51 AM UTC by PhanTranQuocDat
**Last Updated:** Tue Mar 28, 2023 02:51 AM UTC
**Owner:** PhanTranQuocDat


Valgrind detected memleak when receive rde message:
==196== 177,584 (1,232 direct, 176,352 indirect) bytes in 22 blocks are 
definitely lost in loss record 81 of 81
==196==at 0x483B7F3: malloc (in 
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==196==by 0x48ADCF0: sysf_alloc_pkt (sysf_mem.c:429)
==196==by 0x489CD15: ncs_enc_init_space_pp (hj_ubaid.c:144)
==196==by 0x48CAF38: mdtm_fill_data (mds_dt_common.c:1454)
==196==by 0x48CAF38: mdtm_fill_data (mds_dt_common.c:1442)
==196==by 0x48CC0C0: mdtm_process_recv_message_common (mds_dt_common.c:544)
==196==by 0x48CC5F8: mdtm_process_recv_data (mds_dt_common.c:1126)
==196==by 0x48D71E7: mdtm_process_recv_events (mds_dt_tipc.c:1144)
==196==by 0x4B5A608: start_thread (pthread_create.c:477)
==196==by 0x4C94132: clone (clone.S:95)

Also, uninitialized value(s):
==351== Conditional jump or move depends on uninitialised value(s)
==351==at 0x50541FB: ava_fill_comp_reg_msg (ava_mds.cc:1310)
==351==by 0x50497D0: AmfAgent::ComponentRegister(unsigned long long, 
SaNameT const*, SaNameT const*) (amf_agent.cc:559)
==351==by 0x10E940: rde_amf_init(RDE_AMF_CB*) (rde_amf.cc:186)
==351==by 0x10DAAE: main (rde_main.cc:458)
==351==  Uninitialised value was created by a stack allocation
==351==at 0x10E743: rde_amf_init(RDE_AMF_CB*) (rde_amf.cc:140)


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.___
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets