New user self-registration is disabled due to spam. Please email eigen-core-team @ if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 945 - error C4789 (Visual Studio)
Summary: error C4789 (Visual Studio)
Alias: None
Product: Eigen
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All Windows
: Normal Compilation Problem
Assignee: Nobody
Depends on:
Blocks: 3.3
  Show dependency treegraph
Reported: 2015-02-02 15:52 UTC by MailMr_S
Modified: 2015-02-18 12:54 UTC (History)
3 users (show)

workaround (1.74 KB, patch)
2015-02-17 17:32 UTC, Gael Guennebaud
no flags Details | Diff

Description MailMr_S 2015-02-02 15:52:59 UTC

typedef double Real;
typedef ::Eigen::Matrix< Real, ::Eigen::Dynamic, ::Eigen::Dynamic > Matrix;

Matrix mat;
// ...

::Eigen::JacobiSVD< Matrix > svd(mat, ::Eigen::ComputeFullU | ::Eigen::ComputeFullV);

1>d:\eigen\include\eigen3\eigen\src\core\products\generalblockpanelkernel.h(1750): error C4789: Der Puffer 'kernel' mit der Größe von 8 Bytes wird überlaufen; 8 Bytes werden ab Offset 24 geschrieben.
Comment 1 MailMr_S 2015-02-02 15:58:59 UTC
Revision: 6655
Changeset: 06f163b5221f14a429abf35a2b5cd6576e2ef431 [06f163b5221f]
Comment 2 Gael Guennebaud 2015-02-17 17:32:19 UTC
Created attachment 547 [details]

This error is usually only a warning, so compiling without too aggressive flags should work and run fine because this part won't be executed in your case. I'm too lazy to turn this into a true compile-time if, so what about the attached workaround? (I cannot check it myself)
Comment 3 MailMr_S 2015-02-18 08:27:51 UTC
Thank you, your patch is working. Btw, it is not only a VS2012 problem. I can reproduce this error with VS2010 and VS2013, too. Which flags should I deactivate?
Comment 4 Gael Guennebaud 2015-02-18 12:54:22 UTC

Note You need to log in before you can comment on or make changes to this bug.