---
title: "tuxedo全局变量丢失"
author: "heiheben"
date: "2009-02-24T21:26:03Z"
tags: []
slug: "tuxedo"
draft: false
lastmod: "2009-02-24T21:37:07Z"
id: 338165
url: "https://heiheben.iteye.com/blog/338165"
---

今天调试一个tuxedo报表服务，发现一个很怪的事情

一个变量在从tuxedo域中取出的时候调用的时候取出来的时候是有值的

到一个函数中的时候值就丢失了

考虑的情况

1.tuxedo域定义有误

2.tuxedo域时候存在重名

3.tuxedo域长度是否超长

 

以上几个情况挨个排查

发现事实为 函数中有一个变量的长度定义太短 导致 赋值时覆盖了其它变量的地址范围

 

cuserlog("report\_log3c.report\_yydtj1:vv\_feetag\_in=%s,Gpub\_input\_para.feetag\_in=%s",vv\_feetag\_in, Gpub\_input\_para.feetag\_in);

   

 

    //cuserlog("report\_log3c.report\_yydtj2:vv\_feetag\_in=%s,Gpub\_input\_para.feetag\_in=%s",vv\_feetag\_in, Gpub\_input\_para.feetag\_in);

    //cuserlog("report\_log3c:vv\_logdate\[%s],vv\_cleardaytime\[%s],vv\_feetag\_in\[%s],strlen(vv\_feetag\_in)=%d, Gpub\_input\_para.feetag=%s",vv\_logdate, vv\_cleardaytime, vv\_feetag\_in, strlen(vv\_feetag\_in), Gpub\_input\_para.feetag\_in);  
    //cuserlog("report\_log3c.report\_yydtj:vv\_feetag\_in=%s,Gpub\_input\_para.feetag\_in=%s",vv\_feetag\_in, Gpub\_input\_para.feetag\_in);