[mod_cluster-issues] [JBoss JIRA] (MODCLUSTER-625) Automatically allocated function local variable address overwrites function parameter
Jean-Frederic Clere (Jira)
issues at jboss.org
Sat Apr 6 04:14:01 EDT 2019
[ https://issues.jboss.org/browse/MODCLUSTER-625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Frederic Clere closed MODCLUSTER-625.
------------------------------------------
Resolution: Won't Fix
That is on purpose.
> Automatically allocated function local variable address overwrites function parameter
> -------------------------------------------------------------------------------------
>
> Key: MODCLUSTER-625
> URL: https://issues.jboss.org/browse/MODCLUSTER-625
> Project: mod_cluster
> Issue Type: Bug
> Components: Native (httpd modules)
> Affects Versions: 1.3.7.Final, 2.0.0.Alpha1
> Environment: C99 (apparently both GNU and MSVC)
> Reporter: Michal Karm
> Assignee: George Zaronikas
> Priority: Major
> Fix For: 2.0.0.Alpha1
>
>
> I went through the cppcheck static analysis report on the current mod_proxy_cluster code base, see [cppcheck.log|https://ci.modcluster.io/job/mod_proxy_cluster-2.x-windows/DISTRO=apache-lounge,label=w2k12r2/93/artifact/cppcheck.log/*view*/], and among *many* warnings and style check failures, there was a one outstanding error reported, which set me wondering.
> The error occurs on two places and I'm scratching my head as to whether is is a false positive or not, WDYT?
> * [native/mod_manager/domain.c:198|https://github.com/modcluster/mod_proxy_cluster/blob/master/native/mod_manager/domain.c#L198]: (error) Address of local auto-variable assigned to a function parameter.
> * [native/mod_manager/node.c:227|https://github.com/modcluster/mod_proxy_cluster/blob/master/native/mod_manager/node.c#L227]: (error) Address of local auto-variable assigned to a function parameter.
> Is it O.K. to handle local, function scope, automatically allocated variable this way? To use it's address later in ap_slotmem_do? Couldn't it trigger undefined behaviour and cause some of our rare, hard to reproduce crashes?
> Feel free to pick up any other pertinent messages from the log.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the mod_cluster-issues
mailing list