Release 5.5.35 68/228368/1 accepted/tizen/5.5/unified/20200321.004529 submit/tizen_5.5/20200320.153547
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Fri, 20 Mar 2020 15:15:21 +0000 (16:15 +0100)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Fri, 20 Mar 2020 15:15:21 +0000 (16:15 +0100)
Change-Id: I35106646c5221c853aedae6cf2c53b4895a8d318

1  2 
packaging/crash-worker.spec
src/shared/config.c
src/shared/config.h

@@@ -13,7 -13,7 +13,7 @@@
  
  Name:           crash-worker
  Summary:        Coredump handler and report generator for Tizen
- Version:        5.5.34
 -Version:        6.0.13
++Version:        5.5.35
  Release:        1
  Group:          Framework/system
  License:        Apache-2.0 and BSD-2-Clause and MIT
@@@ -268,6 -268,7 +268,7 @@@ mkdir -p %{buildroot}%{crash_temp
  %{_libdir}/crash-worker/system-tests/utils/libcrash-servicetest
  %{_libdir}/crash-worker/system-tests/utils/minicore-utils.sh
  %{_libdir}/crash-worker/system-tests/wait_for_opt_usr/wait_for_opt_usr.sh
+ %{_libdir}/crash-worker/system-tests/without_so_info_file/without_so_info_file.sh
  %{_libdir}/crash-worker/system-tests/without_core/without_core.sh
  
  %if %{with livedumper}
diff --combined src/shared/config.c
@@@ -53,7 -53,7 +53,7 @@@ enum ReportType report_type_from_str(co
        return REP_TYPE_INVALID;
  }
  
 -static int config_load_exclude_paths(config_t *c, const dictionary *ini)
 +static int config_load_exclude_paths(config_t *c, dictionary *ini)
  {
        assert(c);
        assert(ini);
        if (n <= 0)
                return 0;
  
 -      const char **keys = alloca(sizeof(char *) * n);
 +      char **keys = alloca(sizeof(char *) * n);
        int total = n + c->n_exclude_paths;
        int n_added = 0;
  
 -      c->exclude_paths = reallocarray(c->exclude_paths, sizeof(char *), total);
 +      c->exclude_paths = realloc(c->exclude_paths, sizeof(char *) * total);
  
        if (!keys || !c->exclude_paths)
                goto err_oom;
  
 -      keys = iniparser_getseckeys(ini, EXCLUDEPATHS_SECTION, keys);
 +      keys = iniparser_getseckeys(ini, EXCLUDEPATHS_SECTION);
        if (!keys)
                goto err_oom;
  
@@@ -109,7 -109,7 +109,7 @@@ bool config_is_path_excluded(config_t *
        return false;
  }
  
 -static bool config_load_from_dict(config_t *c, const dictionary *ini)
 +static bool config_load_from_dict(config_t *c, dictionary *ini)
  {
        assert(c);
        assert(ini);
        UPDATE(c->max_retention_sec, int, "MaxRetentionSec");
        UPDATE(c->max_crash_dump, int, "MaxCrashDump");
        UPDATE(c->dump_core, boolean, "DumpCore");
+       UPDATE(c->dump_so_info, boolean, "DumpSharedObjectInfo");
        UPDATE(c->allow_zip, boolean, "AllowZip");
        UPDATE(c->legacy_notification, boolean, "UseLegacyNotification");
  
@@@ -247,6 -248,7 +248,7 @@@ static bool config_apply_defaults(confi
        c->max_retention_sec = MAX_RETENTION_SEC;
        c->max_crash_dump = MAX_CRASH_DUMP;
        c->dump_core = DUMP_CORE;
+       c->dump_so_info = DUMP_SO_INFO;
        c->allow_zip = ALLOW_ZIP;
        c->legacy_notification = LEGACY_NOTIFICATION;
  
@@@ -265,6 -267,7 +267,7 @@@ static void config_dump(config_t *c
           "config: max_retention_sec = %d\n"
           "config: max_crash_dump = %d\n"
           "config: dump_core = %d\n"
+          "config: dump_so_info = %d\n"
           "config: allow_zip = %d\n"
           "config: legacy_notification = %d\n",
           c->crash_root_path,
           c->max_retention_sec,
           c->max_crash_dump,
           c->dump_core,
+          c->dump_so_info,
           c->allow_zip,
           c->legacy_notification);
  }
diff --combined src/shared/config.h
  #define MAX_RETENTION_SEC    0
  #define MAX_CRASH_DUMP       0
  #define DUMP_CORE            1
+ #define DUMP_SO_INFO         1
  #define ALLOW_ZIP            1
  #define LEGACY_NOTIFICATION  0
  
  #define CRASH_SECTION        "CrashManager"
 -#define EXCLUDEPATHS_SECTION  "ExcludePaths"
 +
 +/* ExcludePaths section name must be lowercase with iniparser 3.x.
 + *
 + * This is to workaround for iniparser 3.x bug, where loaded strings
 + * are converted to lowercase, but query string is not, precisely
 + * getsecnkeys() does strcmp(lowercase-key-in-db, user-provided-str).
 + */
 +#define EXCLUDEPATHS_SECTION "excludepaths"
  
  enum ReportType {
        REP_TYPE_INVALID = -1,
@@@ -49,6 -43,7 +50,7 @@@
  typedef struct config {
        bool allow_zip;
        bool dump_core;
+       bool dump_so_info;
        bool legacy_notification;
        enum ReportType report_type;
        int system_max_use;