poco icon indicating copy to clipboard operation
poco copied to clipboard

App crashes when using a Poco::format.

Open Ratevandr opened this issue 2 years ago • 2 comments

Debian 11 POCO version: 1.10.0 (gcc version 10.2.1)

Example code:

#include <Poco/Format.h>

template<typename... Args>
void funct(Args... args)   {
    std::string msg = Poco::format(args...);
}

int main()
{
    bool var=false;
    funct("Test %s", "test"); // crash
    std::string var2="test";
    funct("Test %s", var2.c_str()); // crash
    funct("Test %s", var2); // OK
    return 0;
}

On ubuntu 20.04 with POCO 1.9.2 (gcc version 9.3.0) everything works fine. What could be the reason? Is there a workaround here?

Ratevandr avatar Sep 08 '21 14:09 Ratevandr

try this funct("Test %s", std::string("test")); Poco::format does not have the const char* funtion

micheleselea avatar Sep 14 '21 13:09 micheleselea

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] avatar Sep 15 '22 03:09 github-actions[bot]

This issue was closed because it has been inactive for 60 days since being marked as stale.

github-actions[bot] avatar Nov 15 '22 03:11 github-actions[bot]