Bug 1161774 - Not able to debug with -fsanitize=address due hard coded vm limit
Summary: Not able to debug with -fsanitize=address due hard coded vm limit
Status: NEW
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: BuildService (show other bugs)
Version: unspecified
Hardware: All openSUSE Factory
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: Marco Strigl
QA Contact: Adrian Schröter
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-24 11:38 UTC by Dr. Werner Fink
Modified: 2020-02-14 10:27 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
werner: needinfo? (marco.strigl)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. Werner Fink 2020-01-24 11:38:12 UTC
In the build script /usr/bin/build there exist

```
setmemorylimit() {
    if test -n "$VM_ROOT" -o -n "$RUNNING_IN_VM" ; then
        return
    fi
    local mem
    local limit
    while read mem; do
        case "$mem" in
            MemTotal:*)
                set -- $mem
                eval "limit=\$(($2/3*2))"
            ;;
            SwapTotal:*)
                set -- $mem
                eval "limit=\$(($2/3*2+$limit))"
            ;;
        esac
    done < <(cat /proc/meminfo) # cat for proc stuff

    ulimit -v $limit
    echo "Memory limit set to ${limit}KB"
}
```

which is called lateron without any option check and this leads to

```
[    0s] Memory limit set to 22171540KB
[    0s] Using BUILD_ROOT=/abuild/oscbuild/openSUSE_Tumbleweed
...
[    0s] Memory limit set to 22171540KB
[    0s] Using BUILD_ROOT=/abuild/oscbuild/openSUSE_Tumbleweed
...
[    6s] checking whether we are cross compiling... configure: error: in `/home/abuild/rpmbuild/BUILD/fig2dev-3.2.7b':
[    6s] configure: error: cannot run C compiled programs.
[    6s] If you meant to cross compile, use `--host'.
[    6s] See `config.log' for more details
[    6s] error: Bad exit status from /var/tmp/rpm-tmp.uINFaP (%build)
```
Comment 1 Dr. Werner Fink 2020-01-24 11:39:16 UTC
Package build-20200107
Comment 2 Dr. Werner Fink 2020-02-14 10:27:18 UTC
Ping?  Just edited the /usr/bin/build script again ... please add an option to set and/opr disable this limit