phosphor-debug-collector: fix phosphor-dump-manager crash in multihost
cper patch and rebase patches.

Background:
On multi-host platforms, injecting crashdump/CPER error events on
secondary nodes (node 1, node 2) caused phosphor-dump-manager to
crash with segmentation faults (SEGV) and std::out_of_range exceptions.
This was caused by two main issues:
1. faultIdTable was defined as a global inline table shared across all
   host managers in the process. When one host looked up a faultId
   registered by another host, calling entries.at() on its own map threw
   std::out_of_range.

Solution:
1. Move faultIdTable from a global variable into an instance member of
   Manager, ensuring complete host isolation.
2. Replace unchecked entries.at() lookups with entries.find() and clean
   up stale entries if not found.

Changes Made:
- dump_manager_faultlog.hpp:
  - Add faultIdTable instance member to Manager.
- dump_manager_faultlog.cpp:
  - Update createDump() to pass &faultIdTable to faultlog::Entry.
  - Safe lookup in faultIdTable via entries.find() instead of at().
  - Fix faultLogFilePath construction using path operator/.
- faultlog_dump_entry.hpp:
  - Remove global faultIdTable and accept faultIdTableMap pointer in
    Entry constructor.
- faultlog_dump_entry.cpp:
  - Erase from faultIdTableMap before parentMap->erase(id).

Tested:
```
On server3 amd platform
Verified multi-host error injection across node 1 and node 2 on target.
Confirmed that crashdump and CPER fault log entries are
created, replaced, and deleted without crashing or memory corruption.
```

Fusion-Link:
platform5: https://fusion2.corp.google.com/24b076cd-6709-3973-9119-46a49784f9ec
platform15: https://fusion2.corp.google.com/fa4fd09b-f45c-31a7-b2b9-a85dc36eeb0f
platform18: https://fusion2.corp.google.com/20dcaf3d-8bd4-35e6-a94a-1f0598913f93
platform17: https://fusion2.corp.google.com/03c22596-6265-3169-bd40-b040256119ef
platform11+ext: https://fusion2.corp.google.com/49713010-0073-3960-839e-fdc8abc29d07
platform11: https://fusion2.corp.google.com/07a0f1c6-6bc0-3925-a0f4-1d2785b262e4
platform25: https://fusion2.corp.google.com/dc3636e4-3f72-31b7-ab64-4f33623c3b3d

Google-Bug-Id:553850432
Change-Id: If317aae9e394b82b402b108c3b2867e053354dc6
Signed-off-by: cmchang <cmchang@google.com>
1 file changed